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] Use of schema references inside enum #3001

Closed
xuorig opened this issue Sep 24, 2023 · 1 comment
Closed

[Schema Inaccuracy] Use of schema references inside enum #3001

xuorig opened this issue Sep 24, 2023 · 1 comment

Comments

@xuorig
Copy link

xuorig commented Sep 24, 2023

I'm trying to revive Anicca, an OpenAPI differ. It currently is failing on the copilot-seat-details schema component.

It's because it is using Schema objects within the enum. Is this expected? I've never seen this before but maybe it's possible with more recent versions. It looks like a oneOf is probably what was needed here?

      "copilot-seat-details": {
        "title": "Copilot for Business Seat Detail",
        "description": "Information about a Copilot for Business seat assignment for a user, team, or organization.",
        "type": "object",
        "properties": {
          "assignee": {
            "type": "object",
            "description": "The assignee that has been granted access to GitHub Copilot.",
            "additionalProperties": true,
            "enum": [
              {
                "$ref": "#/components/schemas/simple-user"
              },
              {
                "$ref": "#/components/schemas/team"
              },
              {
                "$ref": "#/components/schemas/organization"
              }
            ]
          },
@bearcherian
Copy link
Contributor

@xuorig we've replaced the usage of enum here with oneOf. Thanks for bringing it to our attention!

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