Skip to content

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

@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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions