Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Jman420 opened this issue Apr 23, 2023 · 1 comment

Comments

@Jman420
Copy link

Jman420 commented Apr 23, 2023

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.

@Jman420
Copy link
Author

Jman420 commented Jul 22, 2023

Any chance of this issue and related ones being addressed?

Related issue : #2510

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

No branches or pull requests

2 participants