diff --git a/packages/go/openapi/doc/openapi.json b/packages/go/openapi/doc/openapi.json index 48e02bf4d..03167223e 100644 --- a/packages/go/openapi/doc/openapi.json +++ b/packages/go/openapi/doc/openapi.json @@ -205,19 +205,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "oneOf": [ - { - "$ref": "#/components/schemas/model.user" - }, - { - "$ref": "#/components/schemas/model.client" - } - ] - } - } + "$ref": "#/components/schemas/api.response.authenticated-requester" } } } @@ -9373,32 +9361,7 @@ "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/api.response.pagination" - }, - { - "$ref": "#/components/schemas/api.response.time-window" - }, - { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/model.ad-data-quality-aggregation" - }, - { - "$ref": "#/components/schemas/model.azure-data-quality-aggregation" - } - ] - } - } - } - } - ] + "$ref": "#/components/schemas/api.response.data-quality-platform-aggregate" } } } @@ -12211,6 +12174,7 @@ "parameters": [ { "name": "finding", + "x-go-name": "FindingDeprecated", "in": "query", "schema": { "$ref": "#/components/schemas/api.params.predicate.filter.string" @@ -12227,6 +12191,7 @@ { "name": "FromPrincipal", "deprecated": true, + "x-go-name": "FromPrincipalDeprecated", "in": "query", "schema": { "$ref": "#/components/schemas/api.params.predicate.filter.string" @@ -12235,6 +12200,7 @@ { "name": "ToPrincipal", "deprecated": true, + "x-go-name": "ToPrincipalDeprecated", "in": "query", "schema": { "$ref": "#/components/schemas/api.params.predicate.filter.string" @@ -12271,6 +12237,7 @@ { "name": "AcceptedUntil", "deprecated": true, + "x-go-name": "AcceptedUntilDeprecated", "in": "query", "schema": { "$ref": "#/components/schemas/api.params.predicate.filter.time" @@ -12574,19 +12541,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "oneOf": [ - { - "$ref": "#/components/schemas/model.list-finding" - }, - { - "$ref": "#/components/schemas/model.relationship-finding" - } - ] - } - } + "$ref": "#/components/schemas/api.response.finding" } } } @@ -12638,6 +12593,7 @@ { "name": "from", "deprecated": true, + "x-go-name": "fromDeprecated", "description": "Lower bound for created_at; to return posture stats starting at a specific date/time", "in": "query", "schema": { @@ -12648,6 +12604,7 @@ { "name": "to", "deprecated": true, + "x-go-name": "toDeprecated", "description": "Upper bound for created_at; to return posture stats upto a specific date/time", "in": "query", "schema": { @@ -13817,6 +13774,21 @@ } ] }, + "api.response.authenticated-requester": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "$ref": "#/components/schemas/model.user" + }, + { + "$ref": "#/components/schemas/model.client" + } + ] + } + } + }, "model.saml-provider": { "allOf": [ { @@ -14786,12 +14758,10 @@ "type": "object", "properties": { "shared_to_user_id": { + "readOnly": true, "allOf": [ { "$ref": "#/components/schemas/null.uuid" - }, - { - "readOnly": true } ] }, @@ -15076,6 +15046,34 @@ } ] }, + "api.response.data-quality-platform-aggregate": { + "allOf": [ + { + "$ref": "#/components/schemas/api.response.pagination" + }, + { + "$ref": "#/components/schemas/api.response.time-window" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/model.ad-data-quality-aggregation" + }, + { + "$ref": "#/components/schemas/model.azure-data-quality-aggregation" + } + ] + } + } + } + } + ] + }, "enum.datapipe-status": { "type": "string", "enum": [ @@ -15477,6 +15475,21 @@ } ] }, + "api.response.finding": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "$ref": "#/components/schemas/model.list-finding" + }, + { + "$ref": "#/components/schemas/model.relationship-finding" + } + ] + } + } + }, "model.risk-posture-stat": { "allOf": [ { diff --git a/packages/go/openapi/src/paths/attack-paths.attack-paths.id.acceptance.yaml b/packages/go/openapi/src/paths/attack-paths.attack-paths.id.acceptance.yaml index 13b964843..da8757639 100644 --- a/packages/go/openapi/src/paths/attack-paths.attack-paths.id.acceptance.yaml +++ b/packages/go/openapi/src/paths/attack-paths.attack-paths.id.acceptance.yaml @@ -51,12 +51,7 @@ put: content: application/json: schema: - type: object - properties: - data: - oneOf: - - $ref: './../schemas/model.list-finding.yaml' - - $ref: './../schemas/model.relationship-finding.yaml' + $ref: './../schemas/api.response.finding.yaml' 400: $ref: './../responses/bad-request.yaml' 401: diff --git a/packages/go/openapi/src/paths/attack-paths.domains.id.details.yaml b/packages/go/openapi/src/paths/attack-paths.domains.id.details.yaml index ad37da2c6..8cfb405bb 100644 --- a/packages/go/openapi/src/paths/attack-paths.domains.id.details.yaml +++ b/packages/go/openapi/src/paths/attack-paths.domains.id.details.yaml @@ -31,6 +31,7 @@ get: - Enterprise parameters: - name: finding + x-go-name: "FindingDeprecated" in: query schema: $ref: './../schemas/api.params.predicate.filter.string.yaml' @@ -44,11 +45,13 @@ get: $ref: './../schemas/api.params.query.sort-by.yaml' - name: FromPrincipal deprecated: true + x-go-name: "FromPrincipalDeprecated" in: query schema: $ref: './../schemas/api.params.predicate.filter.string.yaml' - name: ToPrincipal deprecated: true + x-go-name: "ToPrincipalDeprecated" in: query schema: $ref: './../schemas/api.params.predicate.filter.string.yaml' @@ -70,6 +73,7 @@ get: $ref: './../schemas/api.params.predicate.filter.string.yaml' - name: AcceptedUntil deprecated: true + x-go-name: "AcceptedUntilDeprecated" in: query schema: $ref: './../schemas/api.params.predicate.filter.time.yaml' diff --git a/packages/go/openapi/src/paths/auth.self.yaml b/packages/go/openapi/src/paths/auth.self.yaml index 2a5b66f35..9eb2a7ab5 100644 --- a/packages/go/openapi/src/paths/auth.self.yaml +++ b/packages/go/openapi/src/paths/auth.self.yaml @@ -33,11 +33,6 @@ get: content: application/json: schema: - type: object - properties: - data: - oneOf: - - $ref: './../schemas/model.user.yaml' - - $ref: './../schemas/model.client.yaml' + $ref: './../schemas/api.response.authenticated-requester.yaml' 429: $ref: './../responses/too-many-requests.yaml' diff --git a/packages/go/openapi/src/paths/data-quality.platform.id.data-quality-stats.yaml b/packages/go/openapi/src/paths/data-quality.platform.id.data-quality-stats.yaml index 675442386..41aaa4df6 100644 --- a/packages/go/openapi/src/paths/data-quality.platform.id.data-quality-stats.yaml +++ b/packages/go/openapi/src/paths/data-quality.platform.id.data-quality-stats.yaml @@ -61,17 +61,7 @@ get: content: application/json: schema: - allOf: - - $ref: './../schemas/api.response.pagination.yaml' - - $ref: './../schemas/api.response.time-window.yaml' - - type: object - properties: - data: - type: array - items: - oneOf: - - $ref: './../schemas/model.ad-data-quality-aggregation.yaml' - - $ref: './../schemas/model.azure-data-quality-aggregation.yaml' + $ref: './../schemas/api.response.data-quality-platform-aggregate.yaml' 400: $ref: './../responses/bad-request.yaml' 401: diff --git a/packages/go/openapi/src/paths/risk-posture.posture-stats.yaml b/packages/go/openapi/src/paths/risk-posture.posture-stats.yaml index 4ecda1bbf..f2a0f7603 100644 --- a/packages/go/openapi/src/paths/risk-posture.posture-stats.yaml +++ b/packages/go/openapi/src/paths/risk-posture.posture-stats.yaml @@ -32,6 +32,7 @@ get: $ref: './../schemas/api.params.query.sort-by.yaml' - name: from deprecated: true + x-go-name: "fromDeprecated" description: Lower bound for created_at; to return posture stats starting at a specific date/time in: query @@ -40,6 +41,7 @@ get: format: date-time - name: to deprecated: true + x-go-name: "toDeprecated" description: Upper bound for created_at; to return posture stats upto a specific date/time in: query diff --git a/packages/go/openapi/src/schemas/api.response.authenticated-requester.yaml b/packages/go/openapi/src/schemas/api.response.authenticated-requester.yaml new file mode 100644 index 000000000..bb2b166f7 --- /dev/null +++ b/packages/go/openapi/src/schemas/api.response.authenticated-requester.yaml @@ -0,0 +1,6 @@ +type: object +properties: + data: + oneOf: + - $ref: './../schemas/model.user.yaml' + - $ref: './../schemas/model.client.yaml' diff --git a/packages/go/openapi/src/schemas/api.response.data-quality-platform-aggregate.yaml b/packages/go/openapi/src/schemas/api.response.data-quality-platform-aggregate.yaml new file mode 100644 index 000000000..c44cdfa81 --- /dev/null +++ b/packages/go/openapi/src/schemas/api.response.data-quality-platform-aggregate.yaml @@ -0,0 +1,12 @@ +allOf: + - $ref: './../schemas/api.response.pagination.yaml' + - $ref: './../schemas/api.response.time-window.yaml' + - type: object + properties: + data: + type: array + items: + oneOf: + - $ref: './../schemas/model.ad-data-quality-aggregation.yaml' + - $ref: './../schemas/model.azure-data-quality-aggregation.yaml' + diff --git a/packages/go/openapi/src/schemas/api.response.finding.yaml b/packages/go/openapi/src/schemas/api.response.finding.yaml new file mode 100644 index 000000000..4a72b945c --- /dev/null +++ b/packages/go/openapi/src/schemas/api.response.finding.yaml @@ -0,0 +1,6 @@ +type: object +properties: + data: + oneOf: + - $ref: './../schemas/model.list-finding.yaml' + - $ref: './../schemas/model.relationship-finding.yaml' diff --git a/packages/go/openapi/src/schemas/model.saved-queries-permissions.yaml b/packages/go/openapi/src/schemas/model.saved-queries-permissions.yaml index d9590ac2d..874c5f871 100644 --- a/packages/go/openapi/src/schemas/model.saved-queries-permissions.yaml +++ b/packages/go/openapi/src/schemas/model.saved-queries-permissions.yaml @@ -20,11 +20,11 @@ allOf: - type: object properties: shared_to_user_id: + readOnly: true allOf: - $ref: './null.uuid.yaml' - - readOnly: true query_id: type: integer format: int64 public: - type: boolean \ No newline at end of file + type: boolean