Skip to content
Merged
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
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,28 @@

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



## Tools
This repository also contains tools for validating, generating, and distributing OpenAPI specifications.
### FoasCLI
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### FoasCLI
### FOASCLI

not sure, but FOAS is an acronym

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressing the comment here: #619

The [tools/cli](tools/cli) directory hosts a Go-based CLI tool used to merge multiple OpenAPI specifications into a single federated specification, which is used for the Admin APIs.

For more details, please refer to the [CLI’s README.md](tools/cli/README.md).

### Spectral
The [tools/spectral](tools/spectral) directory contains MongoDB-specific [Spectral](https://github.com/stoplightio/spectral) rule definitions.
These rules are used to validate that the generated OpenAPI specifications comply with MongoDB’s guidelines.

For more details, please refer to the [Spectral’s README.md](tools/spectral/README.md).


### Postman
The [tools/postman](tools/postman) directory contains the logic required to generate the [MongoDB Atlas Postman collections](https://www.postman.com/mongodb-devrel?tab=collections).

For more details, please refer to the [Spectral’s README.md](tools/postman/README.md).



## Contributing
See our [CONTRIBUTING.md](../../CONTRIBUTING.md) guide.
39 changes: 39 additions & 0 deletions tools/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# FoasCLI
FoasCLI is a Go-based CLI tool that provides commands for generating the Federated OpenAPI specification and the API changelog.

### Build From Source

#### Fetch Source

```bash
git clone https://github.com/mongodb/openapi.git
cd openapi/tools/cli
```

#### Build
To build `foascli`, run:

```bash
make build
```

The resulting `foascli` binary is placed in `./bin`.

## Usage
To get a list of available commands, run `foascli help`.

## Setup Environment
To set up the development environment, run:
```bash
make setup
```

### Run tests
To run unit and e2e tests, run:
```bash
make lint && unit-test && e2e-test
```

## Contributing

See our [CONTRIBUTING.md](../../CONTRIBUTING.md) guide.
Loading