Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/directus/openapi
OpenAPI Specification for the Directus API
https://github.com/directus/openapi
directus openapi spec
Last synced: 22 days ago
JSON representation
OpenAPI Specification for the Directus API
- Host: GitHub
- URL: https://github.com/directus/openapi
- Owner: directus
- License: mit
- Created: 2024-12-17T20:19:25.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-23T16:16:43.000Z (24 days ago)
- Last Synced: 2024-12-23T16:37:17.581Z (24 days ago)
- Topics: directus, openapi, spec
- Language: TypeScript
- Homepage: https://directus.io
- Size: 234 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Directus' OpenAPI Specification
This repo contains the OpenAPI specifications for Directus' API.
The static spec in this repo contains all the system endpoints and a definition for a generic `/items/{collection}` endpoint.
## Usage
The spec is exported in 3 formats: `.yaml`, `.json`, and `.js`. The JS file is just an `export` of the same JSON but parsed into JS for ease of use in JS projects.
## Requirements
The specification is written to work with OpenAPI version 3 and up.
## Vendor Extensions
The spec relies on two vendor-specific fields to represent information required by the system:
### `x-collection`
Key that maps a system endpoint to its corresponding system collection.
### `x-codeSamples`
Examples of how to use the equivalent of the documented REST endpoint in the JS SDK and/or GraphQL endpoint.
## Deploying Releases
> [!NOTE]
> This requires write access to the `@directus` organization on npmTo deploy a new release to npm:
- `rm -rf dist` if it exists
- `pnpm build` to build a new `dist` folder
- `pnpm lint` to ensure the built spec is valid
- `pnpm version `
- `git push && git push --tags`
- `pnpm publish`This manual process will be replaced with a CD action, but until we set that up, follow the above :)