Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions tools/cli/test/data/split/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Updating test data

To update the test data for a given branch, you can follow the steps below

#### Step 1: Evergreen
- Go to evergreen and find the latest run
- Go to `OPENAPI_GENERATE_SPECS` task
- Go to the files link, then righ click and copy the link for any of the files
- Redact the file name from the link, so you have the task files link

#### Step 2: Update the download_specs.sh script if neeeded
- Check what are the current versions in the environment you want to update
- You can check the available versions for a given env via this [link](https://cloud.mongodb.com/api/openapi/versions)

#### Step 3: Run download_specs.sh script
- With the copied link, run the command `./tools/cli/test/data/split/download_specs.sh <s3_bucket_url> <env>`

Example
```shell
./tools/cli/test/data/split/download_specs.sh https://<s3_bucket_link>/mms/e6ba3136dbd0be2a81dd4ed21b9e6c470edd4420/24_10_05_23_26_12 dev
```

2 changes: 1 addition & 1 deletion tools/cli/test/data/split/dev/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The last update for this folder was with commit SHA "09d9d18db2111c955a8e01702a27ca2763417782" in branch dev
The last update for this folder was with commit SHA "e6ba3136dbd0be2a81dd4ed21b9e6c470edd4420" in branch dev
304 changes: 125 additions & 179 deletions tools/cli/test/data/split/dev/openapi-api-registry.json
Original file line number Diff line number Diff line change
@@ -1,223 +1,169 @@
{
"openapi": "3.0.1",
"info": {
"title": "API Registry Service API",
"description": "API Registry OpenAPI Specification.",
"version": "0.1.0"
"openapi" : "3.0.1",
"info" : {
"title" : "API Registry Service API",
"description" : "API Registry OpenAPI Specification.",
"version" : "0.1.0"
},
"servers": [
{
"url": "http://localhost:50053",
"description": "localhost"
}
],
"security": [
{
"internalClient": []
}
],
"tags": [
{
"name": "Internal",
"description": "Private resources."
},
{
"name": "OpenAPI",
"description": "Returns information about the MongoDB Atlas Specification."
}
],
"paths": {
"/api/atlas/v2/openapi/info": {
"get": {
"tags": ["OpenAPI"],
"summary": "Return general information about the MongoDB Atlas Administration API OpenAPI Specification.",
"description": "This resource returns general information about the MongoDB Atlas Administration API OpenAPI Specification.",
"operationId": "getOpenApiInfo",
"parameters": [
{
"$ref": "openapi-mms.json#/components/parameters/pretty"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/vnd.atlas.2024-05-30+json": {
"schema": {
"$ref": "#/components/schemas/OpenApiInfo"
"servers" : [ {
"url" : "http://localhost:50053",
"description" : "localhost"
} ],
"security" : [ {
"internalClient" : [ ]
} ],
"tags" : [ {
"name" : "Internal",
"description" : "Private resources."
}, {
"name" : "OpenAPI",
"description" : "Returns information about the MongoDB Atlas Specification."
} ],
"paths" : {
"/api/atlas/v2/openapi/info" : {
"get" : {
"tags" : [ "OpenAPI" ],
"summary" : "Return general information about the MongoDB Atlas Administration API OpenAPI Specification.",
"description" : "This resource returns general information about the MongoDB Atlas Administration API OpenAPI Specification.",
"operationId" : "getOpenApiInfo",
"parameters" : [ {
"$ref" : "openapi-mms.json#/components/parameters/pretty"
} ],
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/vnd.atlas.2024-05-30+json" : {
"schema" : {
"$ref" : "#/components/schemas/OpenApiInfo"
},
"x-xgen-version": "2024-05-30",
"x-sunset": "2025-05-30"
"x-xgen-version" : "2024-05-30",
"x-sunset" : "2025-05-30"
},
"application/vnd.atlas.2025-01-01+json": {
"schema": {
"$ref": "#/components/schemas/OpenApiInfo"
"application/vnd.atlas.2025-01-01+json" : {
"schema" : {
"$ref" : "#/components/schemas/OpenApiInfo"
},
"x-xgen-version": "2025-01-01"
"x-xgen-version" : "2025-01-01"
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
"401" : {
"$ref" : "openapi-mms.json#/components/responses/unauthorized"
},
"500": {
"$ref": "openapi-mms.json#/components/responses/internalServerError"
"500" : {
"$ref" : "openapi-mms.json#/components/responses/internalServerError"
}
},
"security": [
{
"DigestAuth": []
}
],
"x-xgen-hidden-env": {
"envs": "qa,stage,prod"
"security" : [ {
"DigestAuth" : [ ]
} ],
"x-xgen-hidden-env" : {
"envs" : "qa,stage,prod"
},
"x-xgen-owner-team": "apix"
"x-xgen-owner-team" : "apix"
}
},
"/rest/unauth/version": {
"get": {
"tags": ["Internal"],
"summary": "Return the deployed gitSHA.",
"description": "This resource returns the deployed gitSHA for the service.",
"operationId": "getVersion",
"parameters": [
{
"$ref": "openapi-mms.json#/components/parameters/pretty"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceVersionView"
"/rest/unauth/version" : {
"get" : {
"tags" : [ "Internal" ],
"summary" : "Return the deployed gitSHA.",
"description" : "This resource returns the deployed gitSHA for the service.",
"operationId" : "getVersion",
"parameters" : [ {
"$ref" : "openapi-mms.json#/components/parameters/pretty"
} ],
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ServiceVersionView"
}
}
}
},
"500": {
"$ref": "openapi-mms.json#/components/responses/internalServerError"
"500" : {
"$ref" : "openapi-mms.json#/components/responses/internalServerError"
}
},
"security": [
{
"DigestAuth": []
}
]
"security" : [ {
"DigestAuth" : [ ]
} ]
}
}
},
"components": {
"schemas": {
"Info": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Description of the MongoDB Atlas Administration API.",
"example": "The MongoDB Atlas Administration API allows developers to manage all components in MongoDB Atlas."
"components" : {
"schemas" : {
"Info" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string",
"description" : "Description of the MongoDB Atlas Administration API.",
"example" : "The MongoDB Atlas Administration API allows developers to manage all components in MongoDB Atlas."
},
"license": {
"$ref": "#/components/schemas/License"
"license" : {
"$ref" : "#/components/schemas/License"
},
"termsOfService": {
"type": "string",
"description": "Terms of Service URL.",
"example": "https://www.mongodb.com/mongodb-management-service-terms-and-conditions"
"termsOfService" : {
"type" : "string",
"description" : "Terms of Service URL.",
"example" : "https://www.mongodb.com/mongodb-management-service-terms-and-conditions"
},
"title": {
"type": "string",
"description": "Title of the MongoDB Atlas Administration API.",
"example": "MongoDB Atlas Administration API."
"title" : {
"type" : "string",
"description" : "Title of the MongoDB Atlas Administration API.",
"example" : "MongoDB Atlas Administration API."
},
"version": {
"type": "string",
"description": "Version of the MongoDB Atlas Administration API.",
"example": "2.0"
"version" : {
"type" : "string",
"description" : "Version of the MongoDB Atlas Administration API.",
"example" : "2.0"
}
},
"description": "Information about the MongoDB Atlas Administration API OpenAPI Specification."
"description" : "Information about the MongoDB Atlas Administration API OpenAPI Specification."
},
"License": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the license.",
"example": "CC BY-NC-SA 3.0 US"
"License" : {
"type" : "object",
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the license.",
"example" : "CC BY-NC-SA 3.0 US"
},
"url": {
"type": "string",
"description": "URL of the license.",
"example": "https://creativecommons.org/licenses/by-nc-sa/3.0/us/"
"url" : {
"type" : "string",
"description" : "URL of the license.",
"example" : "https://creativecommons.org/licenses/by-nc-sa/3.0/us/"
}
},
"description": "License information of the MongoDB Atlas Administration API."
"description" : "License information of the MongoDB Atlas Administration API."
},
"OpenApiInfo": {
"type": "object",
"properties": {
"info": {
"$ref": "#/components/schemas/Info"
}
}
},
"ApiError": {
"type": "object",
"properties": {
"detail": {
"type": "string",
"description": "Describes the specific conditions or reasons that cause each type of error."
},
"error": {
"type": "integer",
"description": "HTTP status code returned with this error.",
"format": "int32",
"externalDocs": {
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status"
}
},
"errorCode": {
"type": "string",
"description": "Application error code returned with this error."
},
"parameters": {
"type": "array",
"description": "Parameters used to give more information about the error.",
"items": {
"type": "object"
}
},
"reason": {
"type": "string",
"description": "Application error message returned with this error."
"OpenApiInfo" : {
"type" : "object",
"properties" : {
"info" : {
"$ref" : "#/components/schemas/Info"
}
}
},
"ServiceVersionView": {
"type": "object",
"properties": {
"gitsha": {
"type": "string",
"description": "The service deployed gitSha."
"ServiceVersionView" : {
"type" : "object",
"properties" : {
"gitsha" : {
"type" : "string",
"description" : "The service deployed gitSha."
}
}
}
},
"securitySchemes": {
"DigestAuth": {
"type": "http",
"scheme": "digest"
"securitySchemes" : {
"DigestAuth" : {
"type" : "http",
"scheme" : "digest"
}
}
}
}
}
Loading
Loading