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

externalDocs missing from tags, schemata and operations. #550

Closed
m-mohr opened this issue Jun 28, 2018 · 8 comments
Closed

externalDocs missing from tags, schemata and operations. #550

m-mohr opened this issue Jun 28, 2018 · 8 comments

Comments

@m-mohr
Copy link
Contributor

m-mohr commented Jun 28, 2018

I have this OpenAPI 3.0 specification:

...
    "/processes": {
      "get": {
        "summary": "List supported processes.",
        "description": "The request asks the back-end for available processes and returns detailed process descriptions, including parameters and return values. Processes are described using the Functio specification for language-agnostic process descriptions.",
        "tags": [
          "Process Discovery"
        ],
        "externalDocs": {
          "description": "Functio specification, version 0.1.0 (or any newer patch version).",
          "url": "https://github.com/m-mohr/functio-spec/blob/master/versions/0.1.0/spec.md"
        },
        "responses": {
          "200": {
            "description": "Functio document describing the supported processes.",
            "content": {
              "application/json": {
                "schema": {
                  "externalDocs": {
                    "description": "Functio specification, version 0.1.0 (or any newer patch version).",
                    "url": "https://github.com/m-mohr/functio-spec/blob/master/versions/0.1.0/spec.md"
                  }
                },
                "examples": {
                  "functioSpecExample": {
                    "externalValue": "https://raw.githubusercontent.com/m-mohr/functio-spec/master/versions/0.1.0/example.json"
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/client_error_auth"
          },
          "5XX": {
            "$ref": "#/components/responses/server_error"
          }
        }
      }
    },
...

Both externalDocs are not rendered by ReDoc as you can see here:
https://open-eo.github.io/openeo-api/v/0.3.0/apireference/index.html#/paths/~1processes/get

Would be helpful to have this feature implemented.

@m-mohr
Copy link
Contributor Author

m-mohr commented Aug 3, 2018

Do you think this will be considered soon? Otherwise I'd need to start adding the externalDocs in the descriptions using markdown.

@RomanHotsiy
Copy link
Member

Yes, it will.
PR's are welcome!

@m-mohr
Copy link
Contributor Author

m-mohr commented Aug 6, 2018

I just checked the status of External Documentation rendering in ReDoc:

  • OpenAPI/Swagger Object: Works as expected
  • Operation Object: Not shown, but model available
  • Schema Object: Not shown, but model available
  • Tag Object: Not shown, but model available

Used this OpenAPI 3.0 spec for testing:

openapi: 3.0.1
info:
  title: External Documentation Test
  version: 0.3.0
externalDocs:
  description: ExternalDocs in OpenAPI Object
  url: 'https://example.com'
tags:
  - name: Group
    externalDocs:
      description: ExternalDocs in Tag Object
      url: 'https://example.com'
paths:
  /example:
    get:
      summary: Example operation
      description: This is a simple example to show whether externalDocs is working with ReDoc or not.
      tags:
        - Group
      externalDocs:
        description: ExternalDocs in Operation Object
        url: 'https://example.com'
      responses:
        '200':
          description: This is a sample schema for a response.
          content:
            application/json:
              schema:
                type: string
                externalDocs:
                  description: ExternalDocs in Schema Object
                  url: 'https://example.com'

@m-mohr m-mohr changed the title externalDocs missing from schema and operations. externalDocs missing from tags, schemata and operations. Aug 6, 2018
@m-mohr
Copy link
Contributor Author

m-mohr commented Aug 6, 2018

@RomanGotsiy I created a PR (#595) to solve this issue. Please feel free to review and add feedback as it was my first time working with React and there may be some issues.

@matthunter
Copy link

I am also interested in this feature. Is there timeline when this will get in?

@RomanHotsiy
Copy link
Member

I will review @m-mohr's PR ASAP. Hopefully this week.

@m-mohr
Copy link
Contributor Author

m-mohr commented Aug 29, 2018

@RomanGotsiy Would be appreciated as I really had problems to solve conflicts in merges with the recent changes and won't have much time to solve them again.

RomanHotsiy pushed a commit that referenced this issue Sep 10, 2018
…fields (#595)

The externalDocs were missing for tags, schemata and operations. Added them with this pull requests. Solves #550.

Additionally, fixes that the URL in External Documentation Object was specified to be optional, which is not correct according to OpenAPI spec.
@m-mohr
Copy link
Contributor Author

m-mohr commented Sep 10, 2018

Solved.

@m-mohr m-mohr closed this as completed Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants