Skip to content

Syntax issues with callback examples #345

@lodup29

Description

@lodup29

I believe that there are a few syntax issues (mainly indentations) with the example provided here and that the complete example should be:

openapi: 3.0.0
info:
  version: 0.0.0
  title: test
paths:
  /subscribe:
    description: Add a subscriber
    post:
      parameters:
        - name: callbackUrl
          in: query
          required: true
          schema:
            type: string
            format: uri
        - name: event
          in: query
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Added
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscriberId: 
                    type: string
                    example: AAA-123-BBB-456                    
          links:  # Link the returned id with the unsubscribe operation
            unsubscribeOp:
              operationId: unsubscribeOperation
              parameters: 
                Id: $response.body#/subscriberId
      callbacks:
        myEvent:
          '{$request.query.callbackUrl}?event={$request.query.event}':
            post:
              requestBody:
                content:
                  application/json:
                    example:
                      message: Some event
              responses:
                '200':
                  description: OK
              
  /unsubscribe:
    post:
      operationId: unsubscribeOperation
      parameters:
        - name: Id
          in: query
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedIssue has been reviewd

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions