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

InfluxDB 2.0: The authorizations "link" should be a "#/components/schemas/Link" [area/api] #13892

Closed
bednar opened this issue May 13, 2019 · 2 comments

Comments

@bednar
Copy link
Contributor

bednar commented May 13, 2019

The Authorization is defined as:

Authorization:
      required: [orgID, permissions]
      allOf:
        - $ref: "#/components/schemas/AuthorizationUpdateRequest"
        - type: object
          properties:
            orgID:
              type: string
              description: ID of org that authorization is scoped to.
            permissions:
              type: array
              minLength: 1
              description: List of permissions for an auth.  An auth must have at least one Permission.
              items:
                $ref: "#/components/schemas/Permission"
            id:
              readOnly: true
              type: string
            token:
              readOnly: true
              type: string
              description: Passed via the Authorization Header and Token Authentication type.
            userID:
              readOnly: true
              type: string
              description: ID of user that created and owns the token.
            user:
              readOnly: true
              type: string
              description: Name of user that created and owns the token.
            org:
              readOnly: true
              type: string
              description: Name of the org token is scoped to.
            links:
              type: object
              readOnly: true
              example:
                self: "/api/v2/authorizations/1"
                user: "/api/v2/users/12"
              properties:
                self:
                  readOnly: true
                  type: string
                  format: uri
                user:
                  readOnly: true
                  type: string
                  format: uri

but should be defined as:

Authorization:
      required: [orgID, permissions]
      allOf:
        - $ref: "#/components/schemas/AuthorizationUpdateRequest"
        - type: object
          properties:
            orgID:
              type: string
              description: ID of org that authorization is scoped to.
            permissions:
              type: array
              minLength: 1
              description: List of permissions for an auth.  An auth must have at least one Permission.
              items:
                $ref: "#/components/schemas/Permission"
            id:
              readOnly: true
              type: string
            token:
              readOnly: true
              type: string
              description: Passed via the Authorization Header and Token Authentication type.
            userID:
              readOnly: true
              type: string
              description: ID of user that created and owns the token.
            user:
              readOnly: true
              type: string
              description: Name of user that created and owns the token.
            org:
              readOnly: true
              type: string
              description: Name of the org token is scoped to.
            links:
              type: object
              readOnly: true
              example:
                self: "/api/v2/authorizations/1"
                user: "/api/v2/users/12"
              properties:
                self:
                  readOnly: true
                  $ref: "#/components/schemas/Link"
                user:
                  readOnly: true
                  $ref: "#/components/schemas/Link"
@stale
Copy link

stale bot commented Aug 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 11, 2019
@stale
Copy link

stale bot commented Aug 18, 2019

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

@stale stale bot closed this as completed Aug 18, 2019
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

1 participant