Redocly / Redocly/redoc

Reference title is displayed in output

Open
#878 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted Type: Enhancement
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

Here's my piece of spec:

"AuthenticatewithFacebookRequest": {
                "required": [
                    "facebookToken",
                    "apiKey",
                    "uuid"
                ],
                "type": "object",
                >>some irrelevant params here<<
                "properties": {
                    "agreements": {
                        "$ref": "#/components/schemas/Agreements"
                    },
                    "attributes": {
                        "$ref": "#/components/schemas/Attributes"
                    },
                    "tags": {
                        "$ref": "#/components/schemas/Tags"
                    }

Here's the "Agreements" schema:

            "Agreements": {
                "description": "Marketing agreements of the Client",
                "required": [
                    "email",
                    "sms",
                    "push",
                    "bluetooth",
                    "rfid",
                    "wifi"
                ],
                "type": "object",
                "properties": {
                    "email": {
                        "type": "boolean",
                        "description": "Permission to receive marketing information by e-mail"
                    },
                    "sms": {
                        "type": "boolean",
                        "description": "Permission to receive marketing information by SMS"
                    },
                    "push": {
                        "type": "boolean",
                        "description": "Permission to receive push notifications"
                    },
                    "bluetooth": {
                        "type": "boolean"
                    },
                    "rfid": {
                        "type": "boolean"
                    },
                    "wifi": {
                        "type": "boolean"
                    }

The output is in the attached image and my problem is marked with arrows. Can I stop ReDoc from attaching the name of the referenced schema? I can use a reference resolver (swagger-combine in my case, with just one file to combine with nothing) before feeding my spec to ReDoc, but could I avoid this additional step?
Screenshot 2019-04-02 at 09 02 35

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the attached output in ReDoc using the shown OpenAPI schemas and their $ref links, then trace how referenced schema names are rendered. Done means ReDoc can avoid displaying the referenced schema name directly, without requiring an external reference-resolver step.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.