DMTF / Redfish-Tools

DMTF-produced tools to support the Redfish Specification
Other
81 stars 35 forks source link

Definiting path parameters in the PathItem instead of Operation #466

Closed commonism closed 8 months ago

commonism commented 8 months ago

I propose to define path parameters in the PathItem definition instead of the Operation to reduce the number of definitions/lines in the description document

Instead of:

  /redfish/v1/TaskService/Tasks/{TaskId}:
    delete:
      parameters:
      - description: The value of the Id property of the Task resource
        in: path
        name: TaskId
        required: true
        schema:
          type: string
…
    get:
      parameters:
      - description: The value of the Id property of the Task resource
        in: path
        name: TaskId
        required: true
        schema:
          type: string
…

  /redfish/v1/TaskService/Tasks/{TaskId}:
    parameters:
      - description: The value of the Id property of the Task resource
        in: path
        name: TaskId
        required: true
        schema:
          type: string

    delete:
…
    get:
…
``
mraineri commented 8 months ago

I agree; this would be a good enhancement. I think we missed it at the time that this was permitted.