Skip to content

Commit

Permalink
docs: add release docs and update the README
Browse files Browse the repository at this point in the history
  • Loading branch information
Skarlso committed Oct 13, 2024
1 parent 8f109c1 commit 1927b6b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ please follow the [How to test CRDs with CTY Readme](./crd-testing-README.md).
Now you can simply run:

```
cty generate -c delivery.krok.app_krokcommands
cty generate crd -c delivery.krok.app_krokcommands
```

Optionally, define a URL at which a CRD is located:

```
cty generate -u https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-aws/main/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml
cty generate crd -u https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-aws/main/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml
```

`cty` does not support authentication modes, therefore the CRD needs to be publicly accessible.
Expand Down Expand Up @@ -64,7 +64,7 @@ It's possible to generate a pre-rendered HTML based output for self-hosting what
To get an HTML output provide the format flag like this:

```
cty generate -c delivery.krok.app_krokcommands --comments --format html
cty generate crd -c delivery.krok.app_krokcommands --comments --format html
```

![parsed1_cli](./imgs/parsed1_cli.png)
Expand Down Expand Up @@ -93,19 +93,35 @@ spec:
To run cty with minimal required fields, pass in `--minimal` to the command like this:

```
cty generate -c delivery.krok.app_krokcommands --comments --minimal --format html
cty generate crd -c delivery.krok.app_krokcommands --comments --minimal --format html
```

### Folder source

To parse multiple CRDs in a single folder, just pass in the whole folder like this:

```
cty generate -r folder
cty generate crd -r folder
```

Any other flag will work as before.

## Schema Generation

cty also provides a way to generate a JSON Schema out of a CRD. Simply use:

```
cty generate schema -c sample-crd/delivery.krok.app_krokcommands.yaml
```

to target a single file. Or

```
cty generate schema -r sample-crd
```
to target a folder.
## WASM frontend
There is a WASM based frontend that can be started by navigating into the `wasm` folder and running the following make
Expand Down
10 changes: 10 additions & 0 deletions docs/release_notes/v0.12.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Release v0.12.0

:boom: _**WARNING**_! This release contains a breaking change. :boom:

I restructured the CLI api. Now, generate is a top level command. It has
TWO subcommands called `crd` and `scheme`. Pull request number [#119](https://github.com/Skarlso/crd-to-sample-yaml/pull/119)
introduced a new feature where you are now able to generate a JSON schema
from a CRD. This is useful for auto-generating completion schemas and further
tooling support that uses raw JSON schemas.

0 comments on commit 1927b6b

Please sign in to comment.