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
-
I'm following the model example on goswagger.io.
Here is my User model including comments. It is in
package routes
Here is the file structure.
main.go
is inpackage main
with a reference to routes as an import statement.To generate the spec I use
swagger generate spec -m -o ./swagger.yaml
while 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-codegen
to generate files based on the-l typescript-axios
language. And when I pass it my swagger.yaml file, theuser.ts
file looks like this:Beta Was this translation helpful? Give feedback.
All reactions