aws-amplify / aws-amplify/amplify-cli
consider providing schemas for JSON files
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Is this feature request related to a new or existing Amplify category?
_No response_
### Is this related to another service?
_No response_
### Describe the feature you'd like to request
> JSON Schema is a vocabulary that allows you to annotate and validate JSON documents.
https://json-schema.org/
JSON schemas enable developers to understand the acceptable JSON structure without seeking help online, and can be used to generate documentation, thus removing the overhead of manually adjusting documentation as schemas evolve.
Samples:
- [turborepo](https://turborepo.org/schema.json)
- [TypeScript](https://json.schemastore.org/tsconfig)
### Describe the solution you'd like
auto-generate JSON files with the corresponding schema file; opt-in for existing projects
For example, in `backend-config.json`:
```json
{
"$schema": "@aws-amplify/amplify-cli/backend-config.schema.json"
}
```
or in a GraphQL's `cli-inputs.json` file:
```json
{
"$schema": "@aws-amplify/amplify-cli/api/cli-inputs.schema.json"
}
```
It may also benefit us to provide versioned schemas:
```json
{
"$schema": "@aws-amplify/amplify-cli/v1/api/cli-inputs.schema.json"
}
```
### Describe alternatives you've considered
n/a; looking at docs
### Additional context
relevant https://github.com/aws-amplify/amplify-cli/issues/5395
### Is this something that you'd be interested in working on?
- [X] 👋 I may be able to implement this feature request
### Would this feature include a breaking change?
- [ ] ⚠️ This feature might incur a breaking change
Contributor guide
Assessment
This issue has not been assessed yet.