Validation on multiple examples
See original GitHub issueProblem
Multiple response examples don’t seem to pass validation when running swagger-cli validate [...]
Example
Following the specification provided in the docs I have the following examples in the spec of an endpoint response:
And the validation fails as follows:
Solution?
I’ve tried to move it around in different ways but I’m pretty sure there’ an issue with the JSON schema for this
Unfortunately I don’t have much expertise when it comes to JSON schemas, so sorry I’m not coming to this with a PR, maybe someone with a bit more knowledge of the codebase can have a look.
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Validating multiple inputs as one - FormValidation
Validating multiple inputs as one. In some cases, you need to validate a value which is combined by various fields. For instance, a...
Read more >11 Awesome Examples of Data Validation | How To Excel
11 Awesome Examples of Data Validation · Allow Uppercase Entries Only · Prevent Future Dates · Creating Drop Down Lists · Dependent Drop...
Read more >Excel Data Validation Drop Down Select Multiple Items
How to select multiple items from Excel Data Validation drop down list, all in one cell. Short videos, written steps, free Excel workbook...
Read more >How to apply multiple data validation in one cell in Excel ...
This article, I will talk about some different examples for solving this task in Excel. Apply multiple data validation in one cell (Example...
Read more >Apply Custom Data Validation for Multiple Criteria in Excel (4 ...
This article shows 4 examples to apply custom data validation for multiple criteria in excel. Learn them, download the workbook and practice.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can imagine - thanks for the fast response though - seems I was just being thick - didn’t realise I had to put the example data under
value
- thanks for helping out!looking at the spec, it looks like
example
allowsany
. If you use examples, you’re limited to using an ExampleObject or a ReferenceObject. openapi-types appears to define these correctly, so I’m assuming it’s an issue with your schema.