Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Validation on multiple examples

See original GitHub issue


Multiple response examples don’t seem to pass validation when running swagger-cli validate [...]


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:



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.


Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

tancredicommented, Nov 26, 2018

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!

jsdevelcommented, Nov 26, 2018

looking at the spec, it looks like example allows any. 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.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found