Uploaded image for project: 'Talend API Design and Testing'
  1. Talend API Design and Testing
  2. ADT-51

Path variable is always required in OAS2/OAS3

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • Hide
      1. Create a resource with a path variable "/test/ {test}
      2. Variable "test" is required by default --> "required: true" in OAS2/OAS3
      3. Set "required" to "optional" (uncheck box) --> "required: true" in OAS2/OAS3
      Show
      Create a resource with a path variable "/test/ {test} Variable "test" is required by default --> "required: true" in OAS2/OAS3 Set "required" to "optional" (uncheck box) --> "required: true" in OAS2/OAS3
    • All
    • Small

    Description

      Path variable is always required in OAS2/OAS3 even if option "required" is unchecked

      ---
      openapi: "3.0.1"
      info:
        title: "test"
        description: "No description"
        version: "1.0.0"
      paths:
        /test/{test}:
          parameters:
          - name: "test"
            in: "path"
            required: true
            schema:
              type: "string"
      
      ---
      swagger: "2.0"
      info:
        description: "No description"
        version: "1.0.0"
        title: "test"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      paths:
        /test/{test}:
          parameters:
          - name: "test"
            in: "path"
            required: true
            type: "string"
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            yherve Yoann Herve
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: