Files

25 lines
1.1 KiB
Go

// Package api implements the REST API mounted under /api. New assembles it
// (api.go): the opportunities, read-only apart from their marks
// (opportunities.go), their classifications (classifications.go), and the
// API's own OpenAPI 3.1 description and docs viewer (openapi.go). New
// resources are added in New and Routes, so the server only mounts the API.
//
// The description is generated from the swag annotations on this package's
// handlers by go generate (swag v2, see the README's dev tools), into
// openapi/swagger.json. The annotations below are the API's general
// information.
//
// @title JobSearch API
// @version 1.0
// @description Procurement opportunities fetched by JobSearch, and the user's
// @description marks on them. Errors are RFC 9457 problem details.
// @servers.url /api
//
// @securityDefinitions.apikey CSRF
// @in header
// @name X-CSRF-Token
// @description From GET /api/csrf; send its cookie too.
package api
//go:generate swag init --v3.1 --generalInfo doc.go --dir . --parseInternal --parseDependencyLevel 1 --requiredByDefault --outputTypes json --output openapi