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] confusing installation account type #1417

Open
yanyongyu opened this issue Aug 8, 2022 · 1 comment
Open

[Schema Inaccuracy] confusing installation account type #1417

yanyongyu opened this issue Aug 8, 2022 · 1 comment

Comments

@yanyongyu
Copy link

Schema Inaccuracy

Current 3.1 description installation account schema uses both type and anyof. Should this uses anyof only? (like what 3.0 do)

installation:
  title: Installation
  description: Installation
  type: object
  properties:
    account:
      anyOf:
      - "$ref": "#/components/schemas/simple-user"
      - "$ref": "#/components/schemas/enterprise"
      type:
      - 'null'
      - object

Expected

installation:
  title: Installation
  description: Installation
  type: object
  properties:
    account:
      anyOf:
      - "$ref": "#/components/schemas/simple-user"
      - "$ref": "#/components/schemas/enterprise"
      - type: 'null'
@yanyongyu
Copy link
Author

I found another similar issue in api description.

In /repos/{owner}/{repo}/issues post body (operationId: issues/create):

requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        properties:
          milestone:
            oneOf:
            - type: string
            - type: integer
              description: 'The `number` of the milestone to associate this
                issue with. _NOTE: Only users with push access can set the milestone
                for new issues. The milestone is silently dropped otherwise._'
            type:
            - 'null'
            - string
            - integer

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

No branches or pull requests

1 participant