Skip to content

potential issues found in openapi.json - body should be required on POST and PUT methods, document states that these are not required #106

@samatstariongroup

Description

@samatstariongroup

Dear All,

I am studying the openapi.json file at https://raw.githubusercontent.com/Systems-Modeling/SysML-v2-API-Services/master/public/docs/openapi.json.

The postProject operation as specified between lines 80 and 100:

      "post": {
        "tags": [
          "Project"
        ],
        "summary": "Create project",
        "operationId": "postProject",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectRequest"
              },
              "examples": {
                "ProjectRequest": {
                  "$ref": "#/components/examples/ProjectRequest"
                }
              }
            }
          },
          "required": false
        }

states that a POST body is not required (see "required": false. Since one has to specify at least the name and an optional description that seems to be a bit odd. I think it should be "required": true.

The same can be found on the PUT method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions