nsip / specgen_input_au

Capture of specgen input files
2 stars 0 forks source link

Illegal use of name property in Reponse objects #45

Closed opoudjis closed 1 year ago

opoudjis commented 1 year ago

Request parameters in OpenAPI, such as components.schemas.httpHeaders.request, are defined by the Parameter object, which includes name.

Response parameters in OpenAPI, such as components.schemas.httpHeaders.response, are defined by the Header object, which is like the Parameter object, but excludes name and in:

The Header Object follows the structure of the Parameter Object with the following changes:

name MUST NOT be specified, it is given in the corresponding headers map. in MUST NOT be specified, it is implicitly in header.

The responses given in the commonDefs files all need to drop their name fields:

e.g.

commonDefs-all-headers.yaml, components.schemas.httpHeaders.response:

        accept:
          name: accept
          schema:
            type: string
          description: >-
            Optional: Indicates to the caller what the provider accepts. Typical values are application/xml or application/json. Often provided when a HTTP code 415 is returned.

This generates the error message:

Error :: spec rule :: Propertynameis not expected here.: 25 times.

opoudjis commented 1 year ago

Blocked until John publishes the YAML file in a commonly accessed place.

opoudjis commented 1 year ago

I've removed them from the all headers file, but @joerghuber will need to incorporate that into his ongoing maintenance.

opoudjis commented 1 year ago

The files will be static....