aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.61k stars 3.91k forks source link

Is the schema for `cdk.json` documented anywhere? #12799

Open ppittle opened 3 years ago

ppittle commented 3 years ago

I'm looking for documentation on the cdk.json file. Is the schema published anywhere?


This is a 📕 documentation issue

NGL321 commented 3 years ago

After a quick search, I think I think I was hasty in calling this guidance. Much of how the cdk.json file can be used is described here, but it is incomplete and spread out.

I'll set this as a feature-request again

NGL321 commented 3 years ago

@Jerry-AWS any thoughts on where this could/should go?

skinny85 commented 3 years ago

Maybe here? https://docs.aws.amazon.com/cdk/latest/guide/context.html

ghost commented 3 years ago

I'm currently working on documenting this. Meet me over here if you have any suggestions:

https://github.com/awsdocs/aws-cdk-guide/issues/129

Yes, it will go in the Context topic.

ppittle commented 3 years ago

FYI, did some more digging and found there was some documentation on the Features portion here: https://docs.aws.amazon.com/cdk/latest/guide/featureflags.html.

Background: If it helps, my motivation was looking for documentation on if I could Specify a custom Output directory in the cdk.json. So instead of cdk synth --output=~/templates could I change my cdk.json to something like

{
    "app": "dotnet run -p cdk/cdk.csproj",
     "output":"~/templates"    // <~~~~~~ is this possible?
}
justinmk3 commented 3 years ago

AWS Toolkit has proposed a schema for cdk.json here: https://github.com/aws/aws-toolkit-vscode/pull/2078 (edit: the schema from that PR should probably be upstreamed to https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/cdk.json)

We are hoping this can live somewhere in CDK upstream, perhaps in a spec/ directory or design/.