Skip to content

Commit

Permalink
fix: fixes branded_preview.sh to run the version command with the c…
Browse files Browse the repository at this point in the history
…orrect branch name for prod + update readme with new badge (#152)
  • Loading branch information
andreaangiolillo authored Aug 9, 2024
1 parent 5312598 commit 5ac597f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/scripts/branded_preview.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash
set -eou pipefail

foascli versions -s v2.json --env "${target_env:?}" -o versions.json

branch_name=${target_env:?}
if [[ "$branch_name" == "prod" ]]; then
branch_name="main"
fi

foascli versions -s v2.json --env "${branch_name:?}" -o versions.json
# Load versions from versions.json
versions=()

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# MongoDB Atlas Administration API (2.0) OpenAPI Specification
# MongoDB Atlas Administration API OpenAPI Specification 3.0
[![OpenAPI (jp)](https://img.shields.io/badge/openapi-click%20to%20preview-green?style=flat&logo=mongodb)](https://htmlpreview.github.io/?https://github.com/mongodb/openapi/blob/main/openapi/branded-preview.html)

This repository hosts the OpenAPI specification for the [Atlas Administration API (v2.0)](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/).

This repository hosts the OpenAPI specification for the [Atlas Administration API (2.0)](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/).
2 changes: 1 addition & 1 deletion openapi/branded-preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<body>
<h2>Preview docs for:</h2>
<ul>
<li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2.json' target="_blank">v2.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2.yaml' target="_blank">v2.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-01-01.json' target="_blank">openapi-2023-01-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-01-01.yaml' target="_blank">openapi-2023-01-01.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-02-01.json' target="_blank">openapi-2023-02-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-02-01.yaml' target="_blank">openapi-2023-02-01.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-10-01.json' target="_blank">openapi-2023-10-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-10-01.yaml' target="_blank">openapi-2023-10-01.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-11-15.json' target="_blank">openapi-2023-11-15.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-11-15.yaml' target="_blank">openapi-2023-11-15.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2024-05-30.json' target="_blank">openapi-2024-05-30.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2024-05-30.yaml' target="_blank">openapi-2024-05-30.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2024-08-05.json' target="_blank">openapi-2024-08-05.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2024-08-05.yaml' target="_blank">openapi-2024-08-05.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2025-01-01.json' target="_blank">openapi-2025-01-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2025-01-01.yaml' target="_blank">openapi-2025-01-01.yaml</a></li>
<li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2.json' target="_blank">v2.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2.yaml' target="_blank">v2.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-01-01.json' target="_blank">openapi-2023-01-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-01-01.yaml' target="_blank">openapi-2023-01-01.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-02-01.json' target="_blank">openapi-2023-02-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-02-01.yaml' target="_blank">openapi-2023-02-01.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-10-01.json' target="_blank">openapi-2023-10-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-10-01.yaml' target="_blank">openapi-2023-10-01.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-11-15.json' target="_blank">openapi-2023-11-15.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2023-11-15.yaml' target="_blank">openapi-2023-11-15.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2024-05-30.json' target="_blank">openapi-2024-05-30.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2024-05-30.yaml' target="_blank">openapi-2024-05-30.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2024-08-05.json' target="_blank">openapi-2024-08-05.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2/openapi-2024-08-05.yaml' target="_blank">openapi-2024-08-05.yaml</a></li>
</ul>
</body>
</html>

0 comments on commit 5ac597f

Please sign in to comment.