Replies: 1 comment 1 reply
-
|
What is the command that you run? Unless the model is reachable from the main function, it might not get included until you add the flag |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm following the model example on goswagger.io.
Here is my User model including comments. It is in
package routesHere is the file structure.
main.gois inpackage mainwith a reference to routes as an import statement.To generate the spec I use
swagger generate spec -m -o ./swagger.yamlwhile being in the directory of main.go.The expected outcome is this format (from the goswagger.io example - my output context is different though). Please note the extent of content for the definitions.
And my output is:
Why is go swagger outputting
x-go-package: <path>instead of all the expected properties as in the example? Is it a problem with my generate spec command? If so, what is the actual command? If that's not it, what other areas might I check?I am ultimately trying to use
swagger-codegento generate files based on the-l typescript-axioslanguage. And when I pass it my swagger.yaml file, theuser.tsfile looks like this:Beta Was this translation helpful? Give feedback.
All reactions