Skip to content

Generated value for corresponding authorisation should be an environment value. #643

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

Closed
VShingala opened this issue Nov 22, 2022 · 1 comment
Labels
auth Issue relates to Authorization of generated collection/request.

Comments

@VShingala
Copy link
Member

For generated collection from definition, some of Auth values are placeholder values which doesn't help much. These values should be environment variables for easier usage.

For example with below schema, generated collection will have auth value as <Bearer Token>. This can be {{bearer_token}} so users can consume them directly as variables instead of doing manual changes. This applies to all kind of authorization types.

openapi: "3.0.0"
info:
  version: 1.0.0
  title: Swagger Petstore
  license:
    name: MIT
servers:
  - url: https://postman-echo.com/get
security:
  - bear: []
paths:
  /pets/{petId}:
    get:
      summary: Info for a specific pet
      operationId: showPetById
      tags:
        - pets
      parameters:
        - name: petId
          in: path
          required: true
          description: The id of the pet to retrieve
          schema:
            type: string
      responses:
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bear:
      type: http
      scheme: bearer
      bearerFormat: JWT
@VShingala VShingala added the auth Issue relates to Authorization of generated collection/request. label Nov 22, 2022
VShingala added a commit that referenced this issue Dec 13, 2022
Fixing issue #643 - Generated value for corresponding authorization should be an environment value.
@VShingala
Copy link
Member Author

Fix is now available in App.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issue relates to Authorization of generated collection/request.
Projects
None yet
Development

No branches or pull requests

1 participant