`metadata.nullable` is inconsistent (E.g. customer vs subscription)

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

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
openapi
Domain
api

Research direction

Start by comparing the Customer and Subscription schema definitions for metadata, especially their required-field lists and the shared documentation shown in the issue. Confirm the intended requiredness with the project’s OpenAPI conventions, then update the specification so the schema and generated documentation agree.

Written by the indexing model from the issue text.

Description

future

Both the Customer and Subscription schema have a metadata property:

  "metadata": {
      "additionalProperties": {
          "maxLength": 500,
          "type": "string"
      },
      "description": "...",
      "type": "object"
  },

But the Subscription lists metadata in the required fields list:

        "required": [

            "metadata",
        ],

Does this imply that the metadata field is nullable for the customer object, but not for the subscription object?

Why is metadata required on the subscription but not the customer?

The docs both show this for both objects (no required tag):

image

Dominant language
No language data
Stars
503
Forks
148
Avg merge
6d 14m
Merged PRs (30d)
5

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.

More from stripe/openapi

All issues in stripe/openapi

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.