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

Link model requestBody field should be String or Object #27

Closed
arturdzm opened this issue Nov 10, 2017 · 4 comments
Closed

Link model requestBody field should be String or Object #27

arturdzm opened this issue Nov 10, 2017 · 4 comments
Labels

Comments

@arturdzm
Copy link
Contributor

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#linkObject

Right now its of type RequestBody but specification states a literal Any | {expression} type.

@arthurdm arthurdm added the bug label Nov 11, 2017
@arturdzm arturdzm changed the title Link annotation requestBody field should be String or Object Link model requestBody field should be String or Object Nov 13, 2017
@arturdzm
Copy link
Contributor Author

RequestBody can be any literal value such json number, array or string or boolean

openapi: '3.0.0'
info:
  title: API
  version: 1.0.0

paths:
  /path:
    get:
      tags: 
        - API
      description: 'Path with callback'
      responses:
        200:
          description: Ok
          links:
            link1:
              operationId: linkPath
              requestBody: 200.0
            link2:
              operationId: linkPath
              requestBody: "a string"
            link3:
              operationId: linkPath
              requestBody: ["val", "val2", "val3"]
              
  /link:
    get:
      tags: 
        - API
      description: 'Link path'
      operationId: linkPath
      responses:
        200:
          description: Ok

Example Object also has value of type Any and its defined as Object:
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#exampleObject

@arthurdm
Copy link
Member

+1

We should keep consistency with Example.value

@arthurdm
Copy link
Member

@arturdzm - will you be working on this one?

arturdzm added a commit to arturdzm/microprofile-open-api that referenced this issue Nov 14, 2017
…ink model

Signed-off-by: Artur Dzmitryieu <dzmitry@ca.ibm.com>
arthurdm added a commit that referenced this issue Nov 14, 2017
Fix for issue #27 - Correct the type of requestBody field in Link model
@arthurdm
Copy link
Member

Fixed by #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants