[Schema Inaccuracy] Example and schema mismatch at patch-schema

Open Beginner friendly
#4,470 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
json, openapi
Domain
api

Research direction

Open descriptions-next/ghes-3.13/ghes-3.13.json and inspect the schema and example locations given in the report. Compare the patch operation value definition with the addMembers example, update either side so they agree, and verify that the example parses against the schema.

Written by the indexing model from the issue text.

Description

documentation

Schema Inaccuracy

The schema at this location is

#/components/schemas/patch-schema/properties/Operations/items/properties/value
                "value": {
                  "type": "string",
                  "description": "Corresponding 'value' of that field specified by 'path'"
                }

The example at is

#/paths/~1scim~1v2~1enterprises~1{enterprise}~1Groups~1{scim_group_id}/patch/requestBody/content/application~1json/examples/addMembers/value
          {
            "Operations" : [ {
              "op" : "add",
              "path" : "members",
              "value" : [ {
                "value" : "879db59-3bdf-4490-ad68-ab880a2694745"
              }, {
                "value" : "0db508eb-91e2-46e4-809c-30dcbda0c685"
              } ]
            } ],
            "schemas" : [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ]
          }

The value cannot be parsed.

Expected

Either the example or schema is updated to match the other.

Reproduction Steps

This has been observed on

https://github.com/github/rest-api-description/raw/main/descriptions-next/ghes-3.13/ghes-3.13.json

I've checked for this in 3.10, 3.11, 3.12, 3.13, 3.14.

Dominant language
No language data
Stars
1.6k
Forks
342
Avg merge
3h 33m
Merged PRs (30d)
51

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 github/rest-api-description

All issues in github/rest-api-description

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.