Skip to content

Commit

Permalink
Automatically updated the core API OpenAPI definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
apicurio-ci committed Oct 15, 2024
1 parent 94ea1f0 commit 589ebec
Showing 1 changed file with 185 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2357,6 +2357,9 @@
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/MethodNotAllowed"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
Expand Down Expand Up @@ -2574,6 +2577,9 @@
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/MethodNotAllowed"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
Expand Down Expand Up @@ -2637,6 +2643,42 @@
"summary": "Get artifact version",
"description": "Retrieves a single version of the artifact content. Both the `artifactId` and the\nunique `version` number must be provided. The `Content-Type` of the response depends \non the artifact type. In most cases, this is `application/json`, but for some types \nit may be different (for example, `PROTOBUF`).\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No version with this `version` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n"
},
"put": {
"requestBody": {
"description": "The new artifact version content.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VersionContent"
}
}
},
"required": true
},
"tags": [
"Versions"
],
"responses": {
"204": {
"description": "The artifact version content was successfully updated."
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/MethodNotAllowed"
},
"409": {
"$ref": "#/components/responses/Conflict"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
},
"operationId": "updateArtifactVersionContent",
"summary": "Update artifact version content",
"description": "Updates the content of a single version of an artifact.\n\nNOTE: the artifact must be in `DRAFT` status.\n\nBoth the `artifactId` and the unique `version` number must be provided to identify\nthe version to update.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No version with this `version` exists (HTTP error `404`)\n* Artifact version not in `DRAFT` status (HTTP error `409`)\n* A server error occurred (HTTP error `500`)\n"
},
"parameters": [
{
"name": "groupId",
Expand Down Expand Up @@ -2872,6 +2914,14 @@
"type": "string"
},
"in": "query"
},
{
"name": "state",
"description": "Filter by version state.",
"schema": {
"$ref": "#/components/schemas/VersionState"
},
"in": "query"
}
],
"responses": {
Expand Down Expand Up @@ -3349,6 +3399,110 @@
}
]
},
"/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/state": {
"summary": "Manage the state of an artifact version.",
"get": {
"tags": [
"Versions"
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WrappedVersionState"
}
}
},
"description": "The current artifact version state."
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
},
"operationId": "getArtifactVersionState",
"summary": "Get artifact version state",
"description": "Gets the current state of an artifact version.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No version with this `version` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n"
},
"put": {
"requestBody": {
"description": "The new state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WrappedVersionState"
}
}
},
"required": true
},
"tags": [
"Versions"
],
"parameters": [
{
"name": "dryRun",
"description": "When set to `true`, the operation will not result in any changes. Instead, it\nwill return a result based on whether the operation **would have succeeded**.",
"schema": {
"type": "boolean"
},
"in": "query"
}
],
"responses": {
"204": {
"description": "The state was successfully updated."
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"$ref": "#/components/responses/Conflict"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
},
"operationId": "updateArtifactVersionState",
"summary": "Update the artifact version state",
"description": "Updates the state of an artifact version.\n\nNOTE: There are some restrictions on state transitions. Notably a version \ncannot be transitioned to the `DRAFT` state from any other state. The `DRAFT` \nstate can only be entered (optionally) when creating a new artifact/version.\nA version in `DRAFT` state can only be transitioned to `ENABLED`. When this\nhappens, any configured content rules will be applied. This may result in a\nfailure to change the state.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No version with this `version` exists (HTTP error `404`)\n* An invalid new state was provided (HTTP error `400`)\n* The draft content violates one or more of the rules configured for the artifact (HTTP error `409`)\n* A server error occurred (HTTP error `500`)\n"
},
"parameters": [
{
"name": "groupId",
"description": "The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern.",
"schema": {
"$ref": "#/components/schemas/GroupId"
},
"in": "path",
"required": true
},
{
"name": "artifactId",
"description": "The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern.",
"schema": {
"$ref": "#/components/schemas/ArtifactId"
},
"in": "path",
"required": true
},
{
"name": "versionExpression",
"description": "An expression resolvable to a specific version ID within the given group and artifact. The following rules apply:\n\n - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to.\n - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern.",
"schema": {
"type": "string"
},
"in": "path",
"required": true
}
]
},
"x-codegen-contextRoot": "/apis/registry/v3"
},
"components": {
Expand Down Expand Up @@ -3932,6 +4086,15 @@
"groupId": {
"$ref": "#/components/schemas/GroupId",
"description": ""
},
"modifiedBy": {
"description": "",
"type": "string"
},
"modifiedOn": {
"format": "date-time",
"description": "",
"type": "string"
}
},
"example": {
Expand Down Expand Up @@ -4773,16 +4936,11 @@
"labels": {
"$ref": "#/components/schemas/Labels",
"description": ""
},
"state": {
"$ref": "#/components/schemas/VersionState",
"description": ""
}
},
"example": {
"name": "Artifact Name",
"description": "The description of the artifact.",
"state": "DEPRECATED",
"labels": {
"custom-1": "foo",
"custom-2": "bar"
Expand All @@ -4794,7 +4952,8 @@
"enum": [
"ENABLED",
"DISABLED",
"DEPRECATED"
"DEPRECATED",
"DRAFT"
],
"type": "string",
"x-codegen-package": "io.apicurio.registry.types"
Expand Down Expand Up @@ -4885,6 +5044,10 @@
"items": {
"type": "string"
}
},
"isDraft": {
"description": "",
"type": "boolean"
}
}
},
Expand Down Expand Up @@ -5117,6 +5280,22 @@
}
}
}
},
"WrappedVersionState": {
"title": "Root Type for WrappedVersionState",
"description": "",
"required": [
"state"
],
"type": "object",
"properties": {
"state": {
"$ref": "#/components/schemas/VersionState"
}
},
"example": {
"state": "ENABLED"
}
}
},
"responses": {
Expand Down

0 comments on commit 589ebec

Please sign in to comment.