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-comply0 opened this issue May 23, 2024 · 1 comment
Closed
6 tasks done

PUT / POST Methods Require RequestBody #97

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

Comments

@brian-comply0
Copy link
Contributor

brian-comply0 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-comply0 brian-comply0 mentioned this issue May 23, 2024
7 tasks
@brian-comply0 brian-comply0 self-assigned this May 23, 2024
brian-comply0 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-comply0
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