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

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

Open
samatstariongroup opened this issue Apr 29, 2023 · 0 comments

Comments

@samatstariongroup
Copy link

samatstariongroup commented Apr 29, 2023

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

@samatstariongroup samatstariongroup changed the title potentail issues found in openapi.json - body should be required on POST and PUT methods, document states that these are not required potential issues found in openapi.json - body should be required on POST and PUT methods, document states that these are not required Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant