oscal-rest icon indicating copy to clipboard operation
oscal-rest copied to clipboard

PUT / POST Methods Require RequestBody

Open brian-comply0 opened this issue 9 months ago • 0 comments

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:
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OSCAL{model-name}"
            application/xml:
              schema:
                $ref: "#/components/schemas/OSCAL{model-name}XML"
            application/yaml:
              schema:
                $ref: "#/components/schemas/OSCAL{model-name}"

  • [ ] 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-comply0 avatar May 23 '24 02:05 brian-comply0