-
Notifications
You must be signed in to change notification settings - Fork 62
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
bugfix/missing quotes templates #143
Conversation
baywet
commented
Nov 23, 2021
•
edited
Loading
edited
- fixes URL templates missing quotes around enum types #140 a bug where quotes would be missing in url templates
af03c51
to
f0cf61b
Compare
test/Microsoft.OpenAPI.OData.Reader.Tests/Edm/ODataOperationSegmentTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml
Outdated
Show resolved
Hide resolved
test/Microsoft.OpenAPI.OData.Reader.Tests/Edm/ODataOperationSegmentTests.cs
Outdated
Show resolved
Hide resolved
MyFunction(param='{param}') can matches ?
|
f0cf61b
to
faa8df1
Compare
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
The OpenAPI that we need to generate should look like this, openapi: 3.0.0
info:
title: example of string path parameter that must be quoted
version: 1.0.0
paths:
get:
/MyFunction(param='{funcParam}'):
parameters:
- name: funcParam
in: path
required: true
schema:
type: string
responses:
200:
description: OK JSON Schema has no notion of a quoted string, so it would be difficult to describe a parameter value that needs to be surrounded by quotes before inserting into the URL. The fact that quotes, single vs double are required are an OData requirement and therefore should be encoded in URL, just like all other OData conventions. You can see in the simple string expansion examples in the URI Template specification that quotes are not inserted for string values.
|
collecting notes from the meeting we've just had:
Overall the group agreed to proceed with this change. @xuzhg for final review and merge. |