From 817eb99cefbbd105df95b98ad75591350a2251c7 Mon Sep 17 00:00:00 2001 From: Donald Date: Tue, 3 Sep 2024 10:48:06 -0400 Subject: [PATCH 1/3] see #104 Fixed all issues in Swagger Editor and issue 104. --- OSCALRestOpenAPI.json | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/OSCALRestOpenAPI.json b/OSCALRestOpenAPI.json index b35991d..1e8f0e1 100644 --- a/OSCALRestOpenAPI.json +++ b/OSCALRestOpenAPI.json @@ -1,5 +1,5 @@ { - "openapi": "3.1.0", + "openapi": "3.1.1", "info": { "title": "OSCAL REST", "description": "This is an open-source REST API specification for exchanging [OSCAL](https://pages.nist.gov/OSCAL/) content between tools and organizations.\n\nThe _OSCAL REST OpenAPI Specification_ addresses OSCAL XML, JSON and YAML content for all seven OSCAL models. Each OSCAL model has a primary set of REST API methods and endpoints for the OSCAL content itself, as well as methods and endpoints for snapshots and attachments. OSCAL profiles also have methods and endpoints for live profile resolution and snapshots of resolved profiles.\n\nFor an overview and more information, visit [https://docs.oscal.io/docs/oscal-rest-openapi](https://docs.oscal.io/docs/oscal-rest-openapi)\n\n---\n\n**Known-Issue: OSCAL XML Representation**\n\nThere is a [known-issue](https://github.com/OAI/OpenAPI-Specification/issues/630) that prevents proper expression of OSCAL XML in OpenAPI.\n\nWhen the specification calls for OSCAL content to be accepted or returned, the content must be fully OSCAL valid. Even if the specification shows a non-compliant schema or example.", @@ -21,6 +21,9 @@ "servers": [ { "url": "http://localhost:8080/oscal/v1" + }, + { + "url": "https://raw.githubusercontent.com/" } ], "tags": [ @@ -1686,15 +1689,6 @@ } } }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OSCALSnapshotAttributes" - } - } - } - }, "security": [ { "oscal_auth": [ @@ -14355,7 +14349,7 @@ }, "snapshot": { "type": "object", - "ref$" : "#components/schemas/OSCALSnapshotAttributes" + "$ref" : "#components/schemas/OSCALSnapshotAttributes" } } }, From 65f66e2dd23f5a1ead1be467b3d89737a8643331 Mon Sep 17 00:00:00 2001 From: DonaldBradleyDev Date: Tue, 3 Sep 2024 09:39:01 -0700 Subject: [PATCH 2/3] fix: openAPI version check error and $ref path error --- OSCALRestOpenAPI.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OSCALRestOpenAPI.json b/OSCALRestOpenAPI.json index 1e8f0e1..30c92ec 100644 --- a/OSCALRestOpenAPI.json +++ b/OSCALRestOpenAPI.json @@ -1,5 +1,5 @@ { - "openapi": "3.1.1", + "openapi": "3.0.9", "info": { "title": "OSCAL REST", "description": "This is an open-source REST API specification for exchanging [OSCAL](https://pages.nist.gov/OSCAL/) content between tools and organizations.\n\nThe _OSCAL REST OpenAPI Specification_ addresses OSCAL XML, JSON and YAML content for all seven OSCAL models. Each OSCAL model has a primary set of REST API methods and endpoints for the OSCAL content itself, as well as methods and endpoints for snapshots and attachments. OSCAL profiles also have methods and endpoints for live profile resolution and snapshots of resolved profiles.\n\nFor an overview and more information, visit [https://docs.oscal.io/docs/oscal-rest-openapi](https://docs.oscal.io/docs/oscal-rest-openapi)\n\n---\n\n**Known-Issue: OSCAL XML Representation**\n\nThere is a [known-issue](https://github.com/OAI/OpenAPI-Specification/issues/630) that prevents proper expression of OSCAL XML in OpenAPI.\n\nWhen the specification calls for OSCAL content to be accepted or returned, the content must be fully OSCAL valid. Even if the specification shows a non-compliant schema or example.", @@ -14349,7 +14349,7 @@ }, "snapshot": { "type": "object", - "$ref" : "#components/schemas/OSCALSnapshotAttributes" + "$ref" : "#/components/schemas/OSCALSnapshotAttributes" } } }, From 2bd131c5493ff6d10fb6ac6d3a2471de6594ab49 Mon Sep 17 00:00:00 2001 From: DonaldBradleyDev Date: Tue, 3 Sep 2024 09:58:33 -0700 Subject: [PATCH 3/3] fix: openAPI version to 3.0.3 --- OSCALRestOpenAPI.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSCALRestOpenAPI.json b/OSCALRestOpenAPI.json index 30c92ec..449ce6e 100644 --- a/OSCALRestOpenAPI.json +++ b/OSCALRestOpenAPI.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.9", + "openapi": "3.0.3", "info": { "title": "OSCAL REST", "description": "This is an open-source REST API specification for exchanging [OSCAL](https://pages.nist.gov/OSCAL/) content between tools and organizations.\n\nThe _OSCAL REST OpenAPI Specification_ addresses OSCAL XML, JSON and YAML content for all seven OSCAL models. Each OSCAL model has a primary set of REST API methods and endpoints for the OSCAL content itself, as well as methods and endpoints for snapshots and attachments. OSCAL profiles also have methods and endpoints for live profile resolution and snapshots of resolved profiles.\n\nFor an overview and more information, visit [https://docs.oscal.io/docs/oscal-rest-openapi](https://docs.oscal.io/docs/oscal-rest-openapi)\n\n---\n\n**Known-Issue: OSCAL XML Representation**\n\nThere is a [known-issue](https://github.com/OAI/OpenAPI-Specification/issues/630) that prevents proper expression of OSCAL XML in OpenAPI.\n\nWhen the specification calls for OSCAL content to be accepted or returned, the content must be fully OSCAL valid. Even if the specification shows a non-compliant schema or example.",