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

[Bug]: Update emitter to set extensions at Path Item Object #3940

Closed
4 tasks done
Tracked by #3941
skywing918 opened this issue Jul 23, 2024 · 1 comment
Closed
4 tasks done
Tracked by #3941

[Bug]: Update emitter to set extensions at Path Item Object #3940

skywing918 opened this issue Jul 23, 2024 · 1 comment
Labels
bug Something isn't working needs-area

Comments

@skywing918
Copy link
Member

Describe the bug

Update emitter to set extensions at Path Item Object

Actual Specification

openapi: 3.0.0
info:
  title: (title)
  version: 0.0.0
tags: []
paths:
  /widgets/{id}:
    get:
      operationId: Widgets_get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: string
components: {}

Expected Specification

https://spec.openapis.org/oas/v3.0.0#path-item-object

openapi: 3.0.0
info:
  title: (title)
  version: 0.0.0
tags: []
paths:
  /widgets/{id}:
    get:
      operationId: Widgets_get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: string
    x-custom: myvalue
components: {}

Reproduction

  1. git clone https://github.com/skywing918/typespec-workaround.git
  2. tsp compile extension-pathItem.tsp
  3. Open /tsp-output/@typespec/openapi3 to get the result

Checklist

@timotheeguerin
Copy link
Member

Dup of #3925

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-area
Projects
None yet
Development

No branches or pull requests

2 participants