Redocly / Redocly/redocly-cli

Create a decorator that supports structured overlays

Open
#1,246 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

governance p3 Type: Enhancement
Dominant language
TypeScript
Stars
1.5k
Forks
228
Avg merge
1d 14h
Merged PRs (30d)
48

Description

Is your feature request related to a problem? Please describe.

Users often want to override summary and description fields in their OpenAPI specifications.

Describe the solution you'd like

There's an initiative in the OpenAPI project called Overlays. We can use the same format and allow a user to supply a [structured overlay consisting of a single action object] that shadows the user's existing OpenAPI structure and replaces fields as needed. This is a partial implementation of the proposed overlays standard, but one that is most clear to understand for users, and which serves the common use case of overwriting many fields in an API description.

We can implement this as a custom plugin in the first instance. We may also need to add some validation logic for the data format.

Describe alternatives you've considered

We already offer the operation-description-override decorator so that individual operations can have their descriptions overwritten by specified markdown files but this requires a lot of entries and many extra files.

Additional context

The OpenAPI Overlays Specification is currently inactive, but it was a good idea, and adopting it is a good starting point for our feature.

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

Start by reviewing the OpenAPI Overlays Specification and the existing operation-description-override decorator documentation. Define the custom plugin's structured single-action overlay format, field-replacement behavior, and required validation; done means the decorator can apply overlays to an existing OpenAPI structure and reject invalid data.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api, cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.