Skip to content

Commit

Permalink
📖 Update OpenAPI spec w/ Assessment changes (konveyor#520)
Browse files Browse the repository at this point in the history
`ArchivedIssue` in the API package being an alias to another type
confuses the swag tool. To mitigate this, I had to overwrite the swagger
type of that field on the Analysis resource with `object`. This means
that the api documentation for that field will be unhelpfully vague, but
it allows the documentation to build.

Signed-off-by: Sam Lucidi <[email protected]>
  • Loading branch information
mansam authored and aufi committed Oct 30, 2023
1 parent 71b7379 commit d4b1822
Show file tree
Hide file tree
Showing 6 changed files with 2,761 additions and 310 deletions.
2 changes: 1 addition & 1 deletion api/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ type Analysis struct {
Archived bool `json:"archived,omitempty" yaml:",omitempty"`
Issues []Issue `json:"issues,omitempty" yaml:",omitempty"`
Dependencies []TechDependency `json:"dependencies,omitempty" yaml:",omitempty"`
Summary []ArchivedIssue `json:"summary,omitempty" yaml:",omitempty"`
Summary []ArchivedIssue `json:"summary,omitempty" yaml:",omitempty" swaggertype:"object"`
}

//
Expand Down
2 changes: 1 addition & 1 deletion api/archetype.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (h ArchetypeHandler) AddRoutes(e *gin.Engine) {
// @description Get an archetype by ID.
// @tags archetypes
// @produce json
// @success 200 {object} api.Archetypes
// @success 200 {object} api.Archetype
// @router /archetypes/{id} [get]
// @param id path string true "Archetype ID"
func (h ArchetypeHandler) Get(ctx *gin.Context) {
Expand Down
Loading

0 comments on commit d4b1822

Please sign in to comment.