Redocly / Redocly/redoc

Support for required additionalProperties in schema

Open
#1,086 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When specifying additionalProperties fields as required there's no indication of these.

Example schema:

openapi: 3.0.2
info:
  title: Test
  version: "0.0.1"
paths:
  /example:
    get:
      summary: Example operation
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    description: dynamic fields, expect to see `prop1` and `prop2` as required field names here
                    additionalProperties:
                      type: string
                  - required:
                    - prop1
                    - prop2
              example:
                prop1: required prop
                prop2: required prop
                prop3: optional prop

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 reproducing the OpenAPI schema shown in the issue and inspect how its rendered documentation represents additionalProperties and required fields. Done means required property names such as prop1 and prop2 are visibly distinguished from optional dynamic properties such as prop3; the payload names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.