Closed croudet closed 5 years ago
can you confirm if servers
or host
is specified in the spec ?
I am trying out https://mrin9.github.io/RapiDoc/example1.html and providing a relative path as ./petstore_spec.json
its working out fine for me
There is no servers
or host
in the spec file.
Is your, 'TRY' API call working ?
However, If it is missing in the spec, and you dont have any control on the spec, you can define the server in the <rapi-doc>
element using server
attribute
Let me know, if this is not the solution you like to settle for and have any alternate suggestion
The Try API
calls are working.
The same spec file with swagger-ui gives : curl -X GET "http://<server>:<port>/ds/assets" -H "accept: */*"
Can you help find out the url generated by swagger-ui
is relative to where you are hosting the .html
or the API spec
Say your html is at http://example.com/api-doc.html
and your spec is at http://example.com/spec/petstore.json
.
<rapi-docs>
The Try API uses the .html's
location
The spec is hosted on the same server as the html. It is specified by a relative url:
<rapi-doc id="rapidoc" show-header="false" theme="dark" layout="row" spec-url="/swagger/diff-server-1.0.yml"/>
released 4.2.4, which should take care of this issue. Feel free to re-open in case it isnt working the way you expect it to be
on the side note, custom-elements should not be self-closed https://stackoverflow.com/questions/23961178/do-custom-elements-require-a-close-tag
When using relative
spec-url
the curl is missing the server part: