Only display API version if present#773
Conversation
|
|
|
Agreed, the implementation should conform to specs. However, it seems to me that ReDoc generally prefers to degrade in service, rather than fail if it encounters a non-compliant spec. This changes simply ensures that this degradation of service is more resilient. Given how simple this change this, and that it fixes a real issue, I would advocate for merging this. If your concern is that it makes a non-compliant spec less easy to catch, I can add a warning so it remains discoverable to developers. |
@TheMarex agree! Just add a warning, please. Thanks! |
|
@RomanGotsiy done! |
|
nice! Thanks! |
|
In the end, decided to remove the warning. ReDoc is documentation tool, not a validator :) |

This only displays the version if it is specified in the info section:
Before
After
This is useful for OpenAPI specifications that bundle several APIs that are versioned independently, hence the global version string makes little sense.