Create a new version
Deploy a new version for a given documentation, which will become the current version.
Body
The version creation request object
-
UUID or slug of the documentation.
-
hub string
UUID or slug of the hub if the documentation is part of a hub.
-
documentation_name string
Name of the documentation to create. Used only if
auto_create_documentation
is set. -
auto_create_documentation boolean
Create the documentation if it does not exist yet. Must be used with a
hub
and adocumentation
.Default value is
false
. -
Serialized definition of the version. This should be an OpenAPI 2.x, 3.x or AsyncAPI 2.x file serialized as a string, in YAML or JSON.
-
references array[object]
Import external references used by
definition
. It's usually resources not accessible by Bump.sh servers, like local files or internal URLs. -
branch_name string
Select a branch for this new version (branch will be created if it doesn't exist).
Defaults to the main branch.
-
previous_version_id string
UUID of a previously deployed version
-
temporary boolean
Whether you want the new version to be temporary or not. By default a new version will be permanent to your documentation.
-
Alias for temporary property.
curl \
-X POST https://bump.sh/api/v1/versions \
-H "Authorization: Token $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"definition":"{\"openapi\": \"3.1.0\", \"info\": { \"title\": … }}","references":[{"content":"string","location":"https://example.com/api/models/pet.yml"}],"branch_name":"dev","documentation":"my_api_slug"}'
{
"definition": "{\"openapi\": \"3.1.0\", \"info\": { \"title\": … }}",
"references": [
{
"content": "string",
"location": "https://example.com/api/models/pet.yml"
}
],
"branch_name": "dev",
"documentation": "my_api_slug"
}
{
"definition": "{\"openapi\": \"3.1.0\", \"info\": { \"title\": … }}",
"references": [
{
"content": "string",
"location": "https://example.com/api/models/pet.yml"
}
],
"documentation": "my_new_api_slug",
"documentation_name": "My new API documentation",
"auto_create_documentation": true
}
{
"hub": "my_hub_slug",
"definition": "{\"openapi\": \"3.1.0\", \"info\": { \"title\": … }}",
"references": [
{
"content": "string",
"location": "https://example.com/api/models/pet.yml"
}
],
"documentation": "my_new_api_slug",
"documentation_name": "My new API documentation",
"auto_create_documentation": true
}
{
"id": "2361df99-3467-4c80-a0cc-45c9fe565812",
"doc_id": "3ef8f52f-9056-4113-840e-2f7183b90e06",
"doc_public_url": "https://bump.sh/doc/my-own-documentation"
}
{
"message": "You need to upgrade to a paid plan to perform this request. Please go to https://bump.sh/account/billing"
}
{
"message": "Invalid definition file",
"errors": {
"raw_definition": [
"The property '#/paths//docs/{:id}/validations/post' contains additional properties [\"yolo\"] outside of the schema when none are allowed"
]
}
}