The provided definition does not specify a valid version field
See original GitHub issue- OS: macOS 10.12.6 (16G1510)
- Browser: chrome
- Version: 70.0.3538.110 (Official Build) (64-bit)
- Method of installation: manual
- Swagger-UI version: v3.18.3
- Swagger/OpenAPI version: 3.0
Swagger/OpenAPI definition:
openapi: "3.0.0"
servers:
- url: 'https://domain.test/api/v1'
description: Dev server
info:
title: API
description: API Documentation
version: '1.0'
paths:
/:
get:
responses:
'200':
description: OK
Swagger-UI configuration options:
<script>
window.onload = function() {
// Begin Swagger UI call region
const ui = SwaggerUIBundle({
url: "{{ $ymlFileUrl }}",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})
// End Swagger UI call region
window.ui = ui
}
</script>
When I hit the route serving Swagger-ui I have the following message displayed:
Unable to render this definition
The provided definition does not specify a valid version field.
Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0).
When I test my definition on https://editor.swagger.io
it is all good!
What am I missing?
Thank you,
J.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
Swagger..Unable to render this definition The provided ...
Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for ...
Read more >Integrated Swagger UI throws error on valid OpenAPI spec file
The provided definition does not specify a valid version field. Please indicate a valid Swagger or OpenAPI version field. Supported version ...
Read more >Unable to render this definition.The provided ...
I get this following error: Unable to render this definition The provided definition does not specify a valid version field. Please indicate a ......
Read more >Bug #2000311 “Unable to render this definition The ...
The provided definition does not specify a valid version field. Please indicate a valid Swagger or OpenAPI version field. Supported version ...
Read more >Unable to render this definition The provided defi...
The provided definition does not specify a valid version field. Please indicate a valid Swagger or OpenAPI version field.
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 have the same issue when the server URL contains a server port (ex: http://myserver:80 or https://myserver:443).
I resolved all my url syntax and resolved the issue 😃
Hi @armstronge975, I tried to solve the problem following the tutorial suggested by you, but problem still occurs. @jrean Could you please explain you solution?