-
Notifications
You must be signed in to change notification settings - Fork 117
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
support custom properties #446
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Roland Ma <[email protected]>
Signed-off-by: Roland Ma <[email protected]>
Signed-off-by: Roland Ma <[email protected]>
Signed-off-by: Roland Ma <[email protected]>
68616e7
to
cad9b8d
Compare
@tiagolobocastro would you like to take a look at this PR? |
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.
@RolandMa1986 sorry this has slipped through the nets.
Could you please add a test for custom properties?
@@ -846,6 +880,7 @@ pub fn emit_v2_definition(input: TokenStream) -> TokenStream { | |||
let mut schema = DefaultSchemaRaw { | |||
name: Some(#schema_name.into()), | |||
example: #example, | |||
extensions:#extensions, |
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.
nit: add space?
@@ -855,6 +890,7 @@ pub fn emit_v2_definition(input: TokenStream) -> TokenStream { | |||
let mut schema = DefaultSchemaRaw { | |||
name: Some(Self::__paperclip_schema_name()), // Add name for later use. | |||
example: #example, | |||
extensions:#extensions, |
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.
nit: add space?
04a5510
to
33cd55f
Compare
Support openapi extensions.
https://swagger.io/docs/specification/openapi-extensions/
The extened properties start with "x_" and will be coverted to "x-" in json.
Output: