-
Notifications
You must be signed in to change notification settings - Fork 298
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
encoding/opeanpi: paths parsing for OpenAPI spec #1727
base: master
Are you sure you want to change the base?
Conversation
Update pathBuilder struct
…rations now the paths are checked with a prefix of the form $/ instead of $
…the case of a wrong http status code
now checking with a regex with words of the form (...)/(...)
…iption parsing in operations
Update pathBuilder struct
…rations now the paths are checked with a prefix of the form $/ instead of $
…the case of a wrong http status code
now checking with a regex with words of the form (...)/(...)
…iption parsing in operations
encoding/openapi/build.go
Outdated
} | ||
|
||
return ast.NewList(items...) | ||
//pb.path.Set("security", ast.NewList(items...)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented code
encoding/openapi/pathResponse.go
Outdated
|
||
} | ||
|
||
//rb.mediaTypes.Set("description", description) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented code
I started hacking against this pr and looking at original tickets and thought i would leave what i learned:
|
@qequ pls address this |
@araddon the only feature I worked on in this PR was the encoding |
@araddon anything else we can help to get this in? |
ping? @araddon |
Implemented parsing for paths in cue when interpreting OpenAPI.
parsing functionality of most of the objects of a path as given by swagger spec;
Parsing notes;
Instead of using a single paths top declaration object defined "Paths" as suggests #386 each path is written separately as a top decl object withe the prefix " $/ ", similarly as Components Objects are defined using definitions.
If Security is defined as a Path Item object, that Security list will be applied to all the operations
For parsing Media Type Objects schemas, Components Objects schemas parsing functionality was reused
Added unit tests
All tests passed (running
go test ./...
)Fixes #386 #735