GithubHelp home page GithubHelp logo

Comments (4)

adamaltman avatar adamaltman commented on August 15, 2024

I agree that a relative path is valid.

Relative references are resolved using the URLs defined in the Server Object as a Base URI.

I wonder should your url be: "/API/flows/NewCustomer-Flow.html" and can you confirm whatever your server(s) is that your {server url}/API/flows/NewCustomer-Flow.html exists?

from redocly-cli.

stevenj avatar stevenj commented on August 15, 2024

No it actually doesn't exist at the server URL.

Currently there is a disparity between the official spec for OpenAPI3 and how both Redoc2 and Swagger UI render it. The spec says a relative URL should be relative to the servers in the server list. But, at least for the externalDocs: both swagger UI and redoc2 use the URL of the web page embedding the openapi3 viewer as the root (which in my opinion makes more sense). And that's how i am using it in this case.

So if my show_openapi.html is at my-domain.com/api/show_openapi.html
./API/flows/file.html becomes: my-domain.com/api/API/flows/file.html and
/API/flows/file.html becomes: my-domain.com/API/flows/file.html

Neither of which is according to the OpenAPI3 spec, but it is sensible.
Links inside markdown descriptions work the same way.

from redocly-cli.

knidarkness avatar knidarkness commented on August 15, 2024

@stevenj , thank you for using openapi-cli. As for now, you can disable the urls validation for the externalDocs using the .redocly.yaml config similar to following:

# apiDefinitions:
# ...  
lint:
# ...  
  rules:
# ...  
    oas3-schema/external-docs:
      url: off
# ...

And we will update the validation rules to support the relative links in relativeDocs & license url's fields.

from redocly-cli.

stevenj avatar stevenj commented on August 15, 2024

Thank you for the workaround, works as expected.

from redocly-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.