New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate spec follows alias types #1087
Conversation
Aliases in swagger.json present as native types. Therefore all validation comments work as expected for them. Also fixes go-swagger#649
Codecov Report
@@ Coverage Diff @@
## master #1087 +/- ##
==========================================
+ Coverage 72.18% 72.28% +0.09%
==========================================
Files 21 21
Lines 6048 6068 +20
==========================================
+ Hits 4366 4386 +20
Misses 1217 1217
Partials 465 465
Continue to review full report at Codecov.
|
oops. master merged |
Perhaps something like this should get a marker annotation and be an additional feature instead of replacing what is there now for schemas. I don't know who's depending on the existing behavior. For query/path/form params this is different though; there it would actually be the expected behavior. |
Do I understand right that it should be like: type Int64 int64
type MyModel struct {
// swagger:alias
// min: 10
IntField Int64 `json:"intField"`
} for any struct and behavior by default for structs annotated with |
Yes I think so, that gives people a way to choose |
good. thanks for the clarification. I'll try to implement it later. |
Thank you sir! |
yeah sorry I lost track of it. I try to follow a merge quickly policy |
Aliases in swagger.json present as native types.
Therefore all validation comments work as expected for them.
Also fixes #649
I use go-swagger only for json generation, please let me know if it breaks anything in code generator or anywhere else.