Skip to content

[Schema Inaccuracy] Installation schema's account property changed from union to intersection #2497

Open
@Jman420

Description

@Jman420

Schema Inaccuracy

The installation schema's account property has changed from an allOf to a anyOf description which results in a type which is the intersection of the two included types (simple-user & enterprise) rather than a union of the two.

"account": {
            "nullable": true,
            "anyOf": [
              {
                "$ref": "#/components/schemas/simple-user"
              },
              {
                "$ref": "#/components/schemas/enterprise"
              }
            ]
          },

Expected

The account property of the installation schema should contain the union of the simple-user and enterprise schema types so that both type's properties are accessible from the returned response.

"account": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/simple-user"
              },
              {
                "$ref": "#/components/schemas/enterprise"
              }
            ]
          },

Reproduction Steps

See octokit/openapi-types.ts#305 for example of improper resulting types.

Activity

Jman420

Jman420 commented on Jul 22, 2023

@Jman420
Author

Any chance of this issue and related ones being addressed?

Related issue : #2510

wolfy1339

wolfy1339 commented on Feb 21, 2025

@wolfy1339

Hi, is there any resolution to this?

Jman420

Jman420 commented on Feb 22, 2025

@Jman420
Author

@wolfy1339 I believe this has been resolved... We no longer have any of the octokit packages pinned to lower versions in our project. Its been so long that I dont remember when or what PR addressed the issue though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ahoglund@wolfy1339@Jman420

        Issue actions

          [Schema Inaccuracy] Installation schema's account property changed from union to intersection · Issue #2497 · github/rest-api-description