Skip to content

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

Merged
darrelmiller merged 2 commits intomasterfrom
dm/examples-fix
Mar 19, 2018
Merged

Changed parameter examples to be dictionary instead of list and fixed ref resolution#230
darrelmiller merged 2 commits intomasterfrom
dm/examples-fix

Conversation

@darrelmiller
Copy link
Member

Fixes #228

/// 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