-
Notifications
You must be signed in to change notification settings - Fork 39
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
How to "merge" allOfs #94
Comments
Doesn't the code generator merge them? |
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 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 take a look here: https://github.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): You would use it with |
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 |
This feature request falls into the analysis package, most likely as an option to "flatten". |
My swagger.json is split into 2 files with a the definition kept in definition.json.
I resolve all
$ref
with the following:If there a way to merge the multiple levels of
allOf
into a single list of properties ? To avoid the following:I tried
analysis.Flatten
but it doesn't seem to do what I'm looking for.The text was updated successfully, but these errors were encountered: