glideapps / glideapps/quicktype
Unable to generate C# types for GitHub's webhook schema
- Dominant language
- TypeScript
- Stars
- 13.9k
- Forks
- 1.2k
- Avg merge
- 8h 53m
- Merged PRs (30d)
- 369
Description
I'm attempting to generate C# types for GitHub's webhook schema. There is no official schema, but they have been generated [here](https://github.com/octokit/webhooks/tree/master/payload-schemas), and I am specifically attempting to [use this file](https://unpkg.com/@octokit/webhooks-schemas@4.2.1/schema.json).
When running the following command:
```sh
quicktype --lang cs --out webhooks.cs --src-lang schema --debug all schema.json
```
I get the error:
```sh
Error: Trying to make an empty union - do you have an impossible type in your schema?.
```
I've uploaded the [full debug output here](https://gist.github.com/JamieMagee/8a3a27c758bdbde77a1c86a368d368e8#file-schema-log-txt), and my quicktype version info is:
```sh
$ quicktype --version
quicktype version 15.0.260
```
I've also attempted to convert from [the TypeScript types](https://github.com/octokit/webhooks/tree/master/payload-types) that are generated from the JSON schema, using the command:
```sh
quicktype --lang cs --out webhooks.cs --src-lang typescript --debug all schema.d.ts
```
quicktype exits with no error ([debug log here](https://gist.github.com/JamieMagee/8a3a27c758bdbde77a1c86a368d368e8#file-typescript-log-txt)), but no POCOs are generated ([see the complete output here](https://gist.github.com/JamieMagee/8a3a27c758bdbde77a1c86a368d368e8#file-typescript-webhooks-cs))
Contributor guide
Assessment
This issue has not been assessed yet.