-
Notifications
You must be signed in to change notification settings - Fork 262
Fixes for issue 233 #236
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
Fixes for issue 233 #236
Conversation
@@ -29,5 +29,6 @@ public enum SecuritySchemeType | |||
/// Use OAuth2 with OpenId Connect URL to discover OAuth2 configuration value. | |||
/// </summary> | |||
[Display("openIdConnect")] OpenIdConnect | |||
|
|||
} |
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 remove empty line
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.
case "csv": | ||
p.Style = ParameterStyle.Simple; | ||
if (p.In == ParameterLocation.Query) |
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.
Query [](start = 50, length = 5)
Cookie as well https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#style-values
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.
Cookie didn't exist in V2, so there is no need to try and translate csv for it,.
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.
Makes sense. Totally forgot :)
{ | ||
writer.WriteProperty("collectionFormat", "pipes"); | ||
} | ||
else if (this.Style == ParameterStyle.PipeDelimited) |
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.
PipeDelimited [](start = 58, length = 13)
SpaceDelimited
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.
Fixed.
public static OpenApiTag LoadTag(ParseNode n) | ||
{ | ||
var mapNode = n.CheckMapNode("tag"); | ||
|
||
var obj = new OpenApiTag(); | ||
var domainObject = new OpenApiTag(); |
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.
domainObject [](start = 16, length = 12)
Why is this called domainObject?
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.
So that when I cut and paste the code from one load to the next, I don't have to rename it :-)
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.
@darrelmiller Darrel. I see that you already merged the commit but there are two issues above (1. Cookie 2. SpaceDelimited) which should be addressed for accuracy. Did you have a chance to take a look? |
See #233
The diff for the round-tripped Petstore V2 JSON document now has 12 differences. They include not rendering
required: false
because that is the default value and we don't render out default values for optional properties. Also, the input document has some empty parameter arrays. These are not rendered in the output. The final difference is that there are some request bodies that have a schema but no consumes. This is not possible to represent in OpenAPI V3. To work around this, we create a content object of typeapplication/json
. This ends up generating a consumes property in the output that isn't present in the input. This is the only semantic difference between the input and output versions and one that I believe is tolerable./cc @scott-lin