-
Notifications
You must be signed in to change notification settings - Fork 195
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
Feature/#139 OpenAPI query string/path parameter examples #243
Conversation
Signed-off-by: choipureum <pooreumsunny@gmail.com>
Signed-off-by: choipureum <pooreumsunny@gmail.com>
Signed-off-by: poo <poo1994@hanmail.net>
Signed-off-by: poo <poo1994@hanmail.net>
Signed-off-by: poo <poo1994@hanmail.net>
Signed-off-by: poo <poo1994@hanmail.net>
Signed-off-by: poo <poo1994@hanmail.net>
Signed-off-by: poo <poo1994@hanmail.net>
Signed-off-by: choipureum <pooreumsunny@gmail.com>
Signed-off-by: choipureum <pooreumsunny@gmail.com>
Signed-off-by: choipureum <pooreumsunny@gmail.com>
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.
Thanks for the PR! I found that we should update OpenApiExampleResolver
as well because it assumes only an object is coming in – it always converts the object into an escaped JSON string.
Line 68 in 36621a6
Value = new OpenApiString(JsonConvert.SerializeObject(instance, settings)), |
However, with this PR, it SHOULD NOT assume the example is an object.
Depending on the type of the example – string, number, boolean, etc. the example value should be one of OpenApiString, OpenApiInteger, OpenApiBoolean, etc.
Could you have a further look?
I understand. Thank you for the review. I will revise and commit as soon as possible. 😀 |
Signed-off-by: poo <poo1994@hanmail.net>
Signed-off-by: poo <poo1994@hanmail.net>
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.
Thanks for your update! I left comments here mainly about declaring your test object types. Please take a further look and update your code in accordance with that.
Please make sure that you're testing all the possible value types.
...soft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/OpenApiParameterAttributeExtensions.cs
Show resolved
Hide resolved
src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/OpenApiExampleFactory.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/OpenApiExampleFactory.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Resolvers/OpenApiExampleResolver.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Resolvers/OpenApiExampleResolver.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Abstractions/IExampleTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Abstractions/IExampleTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Abstractions/IExampleTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Abstractions/IExampleTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Abstractions/IExampleTests.cs
Outdated
Show resolved
Hide resolved
Signed-off-by: poo <poo1994@hanmail.net>
Signed-off-by: poo <poo1994@hanmail.net>
Signed-off-by: poo <poo1994@hanmail.net>
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.
Thanks for your comprehensive updates! It's almost there.
We've now got DateTime
related ones, but not yet DateTimeOffset
related ones. Could you please consider the DateTimeOffset
related examples, tests, etc?
...soft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/OpenApiParameterAttributeExtensions.cs
Outdated
Show resolved
Hide resolved
Signed-off-by: ChoiPuReum <pooreumsunny@gmail.com>
Signed-off-by: ChoiPuReum <pooreumsunny@gmail.com>
Signed-off-by: ChoiPuReum <pooreumsunny@gmail.com>
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.
LGTM! Thanks for your contribution!
related issue : #139
This PR can provide examples for query string/path parameters. It is based on the form written on the existing
payloadAttribute
.OverView: