mirror of
https://codeberg.org/crowci/crow.git
synced 2025-08-06 09:22:46 +03:00
- Use title and message in error message - Errors: don't auto-remove popup, force click - Show API method and endpoint in error message title - Use black/white bg and notification type color only on the side - Return errors as JSON instead of strings. Include the api endpoint in the error message. - improve error messages when missing access token - improve pipeling config load error messages - Error messages are shown for 9s (instead of 3) - remove custom `notifyError` function - Increase popup width from 300px to 340px Co-authored-by: crowci-bot <admin@crowci.dev> Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com> Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> Reviewed-on: https://codeberg.org/crowci/crow/pulls/56 Co-authored-by: pat-s <patrick.schratz@gmail.com> Co-committed-by: pat-s <patrick.schratz@gmail.com>
38 lines
1.4 KiB
Go
38 lines
1.4 KiB
Go
// Copyright 2023 Woodpecker Authors
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package main
|
|
|
|
import (
|
|
"codeberg.org/crowci/crow/v3/cmd/server/openapi"
|
|
"codeberg.org/crowci/crow/v3/version"
|
|
)
|
|
|
|
// Generate docs/openapi.json via:
|
|
//go:generate go run openapi_json_gen.go openapi.go
|
|
//go:generate go run github.com/getkin/kin-openapi/cmd/validate ../../docs/openapi.json
|
|
|
|
// setupOpenAPIStaticConfig initializes static content (version) for the OpenAPI config.
|
|
//
|
|
// @title Crow CI API
|
|
// @description Crow CI is a lightweight, community-driven CI application for self-hosted environments.
|
|
// @description To get a personal access token (PAT) for authentication, please log in
|
|
// @description and go to you personal profile page, by clicking the user icon at the top right.
|
|
// @BasePath /api
|
|
// @contact.name Crow CI
|
|
// @contact.url https://crowci.dev/
|
|
func setupOpenAPIStaticConfig() {
|
|
openapi.SwaggerInfo.Version = version.String()
|
|
}
|