-
Notifications
You must be signed in to change notification settings - Fork 116
support custom properties #446
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Roland Ma <rolandma@outlook.com>
Signed-off-by: Roland Ma <rolandma@outlook.com>
Signed-off-by: Roland Ma <rolandma@outlook.com>
68616e7 to
cad9b8d
Compare
|
@tiagolobocastro would you like to take a look at this PR? |
tiagolobocastro
left a comment
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?
| 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?
| 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:
{ "type": "object", "properties": { "some_property": { "x-my-property": 3, "type": "integer", "format": "int32" } }