You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to get Swagger running for a few hours now. I can't seem to get responses working at all. Using code directly from the example page (https://goswagger.io/use/spec/response.html):
// A ValidationError is an error that is used when the required input fails validation.
// swagger:response validationError
type ValidationError struct {
// The error message
// in: body
Body struct {
// The validation message
//
// Required: true
// Example: Expected type int
Message string
// An optional field name to which this validation applies
FieldName string
}
}
And building with swagger generate spec -o ./swagger.yaml (also tried swagger generate spec -o ./swagger.yaml --scan-models), I get this output:
responses:
validationError:
description: A ValidationError is an error that is used when the required input fails validation.
No amount of anything seems to fix this from what I've tried.
Problem statement
I've been trying to get Swagger running for a few hours now. I can't seem to get responses working at all. Using code directly from the example page (https://goswagger.io/use/spec/response.html):
And building with
swagger generate spec -o ./swagger.yaml
(also triedswagger generate spec -o ./swagger.yaml --scan-models
), I get this output:No amount of anything seems to fix this from what I've tried.
Any help would be greatly appreciated!
Environment
swagger version: v0.30.5 (I've tried static builds + homebrew)
go version: 1.22.0 + 1.21.5
OS: darwin/arm64
The text was updated successfully, but these errors were encountered: