Skip to content

Commit 73cb4b9

Browse files
Merge pull request #268 from compliance-framework/fix/gch-995-ssp-by-component-update
BCH-995: SSP By-Component Update Implementation
2 parents 4831cf2 + b138676 commit 73cb4b9

File tree

5 files changed

+483
-1
lines changed

5 files changed

+483
-1
lines changed

docs/docs.go

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12654,6 +12654,86 @@ const docTemplate = `{
1265412654
}
1265512655
}
1265612656
},
12657+
"/oscal/system-security-plans/{id}/control-implementation/implemented-requirements/{reqId}/statements/{stmtId}/by-components/{byComponentId}": {
12658+
"put": {
12659+
"description": "Updates a by-component within an existing statement within an implemented requirement for a given SSP.",
12660+
"consumes": [
12661+
"application/json"
12662+
],
12663+
"produces": [
12664+
"application/json"
12665+
],
12666+
"tags": [
12667+
"System Security Plans"
12668+
],
12669+
"summary": "Update a by-component within a statement (within an implemented requirement)",
12670+
"parameters": [
12671+
{
12672+
"type": "string",
12673+
"description": "SSP ID",
12674+
"name": "id",
12675+
"in": "path",
12676+
"required": true
12677+
},
12678+
{
12679+
"type": "string",
12680+
"description": "Requirement ID",
12681+
"name": "reqId",
12682+
"in": "path",
12683+
"required": true
12684+
},
12685+
{
12686+
"type": "string",
12687+
"description": "Statement ID",
12688+
"name": "stmtId",
12689+
"in": "path",
12690+
"required": true
12691+
},
12692+
{
12693+
"type": "string",
12694+
"description": "By-Component ID",
12695+
"name": "byComponentId",
12696+
"in": "path",
12697+
"required": true
12698+
},
12699+
{
12700+
"description": "By-Component data",
12701+
"name": "by-component",
12702+
"in": "body",
12703+
"required": true,
12704+
"schema": {
12705+
"$ref": "#/definitions/oscalTypes_1_1_3.ByComponent"
12706+
}
12707+
}
12708+
],
12709+
"responses": {
12710+
"200": {
12711+
"description": "OK",
12712+
"schema": {
12713+
"$ref": "#/definitions/handler.GenericDataResponse-oscalTypes_1_1_3_ByComponent"
12714+
}
12715+
},
12716+
"400": {
12717+
"description": "Bad Request",
12718+
"schema": {
12719+
"$ref": "#/definitions/api.Error"
12720+
}
12721+
},
12722+
"404": {
12723+
"description": "Not Found",
12724+
"schema": {
12725+
"$ref": "#/definitions/api.Error"
12726+
}
12727+
},
12728+
"500": {
12729+
"description": "Internal Server Error",
12730+
"schema": {
12731+
"$ref": "#/definitions/api.Error"
12732+
}
12733+
}
12734+
}
12735+
}
12736+
},
1265712737
"/oscal/system-security-plans/{id}/import-profile": {
1265812738
"get": {
1265912739
"description": "Retrieves import-profile for a given SSP.",
@@ -16122,6 +16202,19 @@ const docTemplate = `{
1612216202
}
1612316203
}
1612416204
},
16205+
"handler.GenericDataResponse-oscalTypes_1_1_3_ByComponent": {
16206+
"type": "object",
16207+
"properties": {
16208+
"data": {
16209+
"description": "Items from the list response",
16210+
"allOf": [
16211+
{
16212+
"$ref": "#/definitions/oscalTypes_1_1_3.ByComponent"
16213+
}
16214+
]
16215+
}
16216+
}
16217+
},
1612516218
"handler.GenericDataResponse-oscalTypes_1_1_3_Capability": {
1612616219
"type": "object",
1612716220
"properties": {

docs/swagger.json

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12648,6 +12648,86 @@
1264812648
}
1264912649
}
1265012650
},
12651+
"/oscal/system-security-plans/{id}/control-implementation/implemented-requirements/{reqId}/statements/{stmtId}/by-components/{byComponentId}": {
12652+
"put": {
12653+
"description": "Updates a by-component within an existing statement within an implemented requirement for a given SSP.",
12654+
"consumes": [
12655+
"application/json"
12656+
],
12657+
"produces": [
12658+
"application/json"
12659+
],
12660+
"tags": [
12661+
"System Security Plans"
12662+
],
12663+
"summary": "Update a by-component within a statement (within an implemented requirement)",
12664+
"parameters": [
12665+
{
12666+
"type": "string",
12667+
"description": "SSP ID",
12668+
"name": "id",
12669+
"in": "path",
12670+
"required": true
12671+
},
12672+
{
12673+
"type": "string",
12674+
"description": "Requirement ID",
12675+
"name": "reqId",
12676+
"in": "path",
12677+
"required": true
12678+
},
12679+
{
12680+
"type": "string",
12681+
"description": "Statement ID",
12682+
"name": "stmtId",
12683+
"in": "path",
12684+
"required": true
12685+
},
12686+
{
12687+
"type": "string",
12688+
"description": "By-Component ID",
12689+
"name": "byComponentId",
12690+
"in": "path",
12691+
"required": true
12692+
},
12693+
{
12694+
"description": "By-Component data",
12695+
"name": "by-component",
12696+
"in": "body",
12697+
"required": true,
12698+
"schema": {
12699+
"$ref": "#/definitions/oscalTypes_1_1_3.ByComponent"
12700+
}
12701+
}
12702+
],
12703+
"responses": {
12704+
"200": {
12705+
"description": "OK",
12706+
"schema": {
12707+
"$ref": "#/definitions/handler.GenericDataResponse-oscalTypes_1_1_3_ByComponent"
12708+
}
12709+
},
12710+
"400": {
12711+
"description": "Bad Request",
12712+
"schema": {
12713+
"$ref": "#/definitions/api.Error"
12714+
}
12715+
},
12716+
"404": {
12717+
"description": "Not Found",
12718+
"schema": {
12719+
"$ref": "#/definitions/api.Error"
12720+
}
12721+
},
12722+
"500": {
12723+
"description": "Internal Server Error",
12724+
"schema": {
12725+
"$ref": "#/definitions/api.Error"
12726+
}
12727+
}
12728+
}
12729+
}
12730+
},
1265112731
"/oscal/system-security-plans/{id}/import-profile": {
1265212732
"get": {
1265312733
"description": "Retrieves import-profile for a given SSP.",
@@ -16116,6 +16196,19 @@
1611616196
}
1611716197
}
1611816198
},
16199+
"handler.GenericDataResponse-oscalTypes_1_1_3_ByComponent": {
16200+
"type": "object",
16201+
"properties": {
16202+
"data": {
16203+
"description": "Items from the list response",
16204+
"allOf": [
16205+
{
16206+
"$ref": "#/definitions/oscalTypes_1_1_3.ByComponent"
16207+
}
16208+
]
16209+
}
16210+
}
16211+
},
1611916212
"handler.GenericDataResponse-oscalTypes_1_1_3_Capability": {
1612016213
"type": "object",
1612116214
"properties": {

docs/swagger.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,13 @@ definitions:
758758
- $ref: '#/definitions/oscalTypes_1_1_3.BackMatter'
759759
description: Items from the list response
760760
type: object
761+
handler.GenericDataResponse-oscalTypes_1_1_3_ByComponent:
762+
properties:
763+
data:
764+
allOf:
765+
- $ref: '#/definitions/oscalTypes_1_1_3.ByComponent'
766+
description: Items from the list response
767+
type: object
761768
handler.GenericDataResponse-oscalTypes_1_1_3_Capability:
762769
properties:
763770
data:
@@ -13719,6 +13726,61 @@ paths:
1371913726
summary: Update a statement within an implemented requirement
1372013727
tags:
1372113728
- System Security Plans
13729+
? /oscal/system-security-plans/{id}/control-implementation/implemented-requirements/{reqId}/statements/{stmtId}/by-components/{byComponentId}
13730+
: put:
13731+
consumes:
13732+
- application/json
13733+
description: Updates a by-component within an existing statement within an implemented
13734+
requirement for a given SSP.
13735+
parameters:
13736+
- description: SSP ID
13737+
in: path
13738+
name: id
13739+
required: true
13740+
type: string
13741+
- description: Requirement ID
13742+
in: path
13743+
name: reqId
13744+
required: true
13745+
type: string
13746+
- description: Statement ID
13747+
in: path
13748+
name: stmtId
13749+
required: true
13750+
type: string
13751+
- description: By-Component ID
13752+
in: path
13753+
name: byComponentId
13754+
required: true
13755+
type: string
13756+
- description: By-Component data
13757+
in: body
13758+
name: by-component
13759+
required: true
13760+
schema:
13761+
$ref: '#/definitions/oscalTypes_1_1_3.ByComponent'
13762+
produces:
13763+
- application/json
13764+
responses:
13765+
"200":
13766+
description: OK
13767+
schema:
13768+
$ref: '#/definitions/handler.GenericDataResponse-oscalTypes_1_1_3_ByComponent'
13769+
"400":
13770+
description: Bad Request
13771+
schema:
13772+
$ref: '#/definitions/api.Error'
13773+
"404":
13774+
description: Not Found
13775+
schema:
13776+
$ref: '#/definitions/api.Error'
13777+
"500":
13778+
description: Internal Server Error
13779+
schema:
13780+
$ref: '#/definitions/api.Error'
13781+
summary: Update a by-component within a statement (within an implemented requirement)
13782+
tags:
13783+
- System Security Plans
1372213784
/oscal/system-security-plans/{id}/import-profile:
1372313785
get:
1372413786
description: Retrieves import-profile for a given SSP.

0 commit comments

Comments
 (0)