Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link rel=service-desc advertises openapi+json, but resource returns a yaml file with content-type text/plain #747

Open
philvarner opened this issue May 18, 2021 · 0 comments

Comments

@philvarner
Copy link
Contributor

philvarner commented May 18, 2021

Describe the bug

Franklin advertises the service-desc link as application/vnd.oai.openapi+json;version=3.0, but actually delivers an OpenAPI YAML file.

Code is:

Link in Landing Page:

    {
      "href": "https://example.org/open-api/spec.yaml",
      "rel": "service-desc",
      "type": "application/vnd.oai.openapi+json;version=3.0",
      "title": "Open API 3 Documentation"
    },

Expected behavior

Link has type application/vnd.oai.openapi;version=3.0 (note without the +json) and retrieving that delivers a OpenAPI JSON file with Content-Type header "application/vnd.oai.openapi;version=3.0".

Additional context

The content type returned by SwaggerHttp4s (in a library) is incorrect, but this component is deprecated anyway in favor of
this newer OpenApi component for tapir https://github.com/softwaremill/tapir/tree/master/docs/openapi-docs/src/main/scala/sttp/tapir/docs/openapi

@philvarner philvarner changed the title Link rel=service-desc advertises openapi+json, but resource returns a yaml file Link rel=service-desc advertises openapi+json, but resource returns a yaml file with content-type text/plain Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant