amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

consider providing schemas for JSON files

Open josefaidt opened this issue 3 years ago • 0 comments

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:

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:

{
  "$schema": "@aws-amplify/amplify-cli/backend-config.schema.json"
}

or in a GraphQL's cli-inputs.json file:

{
  "$schema": "@aws-amplify/amplify-cli/api/cli-inputs.schema.json"
}

It may also benefit us to provide versioned schemas:

{
  "$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

josefaidt avatar Mar 22 '22 19:03 josefaidt