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

PUT / POST Methods Require RequestBody #97

Closed
6 tasks done
brian-ruf-ezd opened this issue May 23, 2024 · 1 comment
Closed
6 tasks done

PUT / POST Methods Require RequestBody #97

brian-ruf-ezd opened this issue May 23, 2024 · 1 comment
Assignees

Comments

@brian-ruf-ezd
Copy link
Contributor

brian-ruf-ezd commented May 23, 2024

All PUT and POST methods require a requestBody element defining the data to be sent from the client to the server.

  • For all PUT and POST involving OSCAL content, include the content below. This includes the following endpoints:
  • POST /{model-name}
  • PUT /{model-name}/{identifier}
        "requestBody": {
          "required" : true,
          "content" : 
            {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OSCAL{ModelName}"
                }
              },
              "application/xml" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OSCAL{ModelName}XML"
                }
              },
              "application/yaml" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OSCAL{ModelName}"
                }
              }
            }
        },
  • For all PUT /{model-name}/attachment/{resourceUUID}/resource insert:
      requestBody:
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OSCALResource"   
  • Define OSCALsnapshot schema
  • For all PUT /{model-name}/snapshot/{identifier} and PUT /profile/{identifier}/resolved-snapshot/{identifier} insert:
      requestBody:
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OSCALsnapshot"   
  • The payload for POST /{model-name}/{id}/snapshot and PUT /{model-name}/{id}/snapshot/{id} is specified as follows:
{
    "snapshot" : {
    	"description" : "markup-multiline",
    	"labels": ["token"],
    	"types" : ["token"]
	}
}
  • labels have a cardinality of 0 or more

  • types have a cardinality of 0 or more

  • description has a cardinality of 0 or 1

  • The payload for POST /{model-name}/{id}/resolved-snapshot and PUT /{model-name}/{id}/resolved-snapshot/{id}` is specified as follows:

{
    "snapshot" : {
    	"description" : "markup-multiline",
    	"labels": ["token"],
    	"types" : ["token"]
	}
}
  • labels have a cardinality of 0 or more
  • types have a cardinality of 0 or more
  • description has a cardinality of 0 or 1
@brian-ruf-ezd brian-ruf-ezd mentioned this issue May 23, 2024
7 tasks
@brian-ruf-ezd brian-ruf-ezd self-assigned this May 23, 2024
brian-ruf-ezd added a commit that referenced this issue Jun 3, 2024
Replaces the YAML version of the spec with a JSON version, which is
updated to resolve:
- #96 
- #97 
- #98
@brian-ruf-ezd
Copy link
Contributor Author

Addressed in PR #99

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