Skip to content

Changed parameter examples to be dictionary instead of list and fixed ref resolution #230

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

Merged
merged 2 commits into from
Mar 19, 2018

Conversation

darrelmiller
Copy link
Member

Fixes #228

@@ -101,7 +101,7 @@ public class OpenApiParameter : IOpenApiSerializable, IOpenApiReferenceable, IOp
/// Furthermore, if referencing a schema which contains an example,
/// the examples value SHALL override the example provided by the schema.
/// </summary>
public IList<OpenApiExample> Examples { get; set; } = new List<OpenApiExample>();
public IDictionary<string,OpenApiExample> Examples { get; set; } = new Dictionary<string,OpenApiExample>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure this change follows up the v3.x spec.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I triple checked that examples is a map, not a list. https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#fixed-fields-10

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@darrelmiller darrelmiller merged commit a117990 into master Mar 19, 2018
@darrelmiller darrelmiller deleted the dm/examples-fix branch March 19, 2018 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants