Skip to content

Unable to generate C# types for GitHub's webhook schema #1392

@JamieMagee

Description

@JamieMagee

I'm attempting to generate C# types for GitHub's webhook schema. There is no official schema, but they have been generated here, and I am specifically attempting to use this file.

Using the following code:

var schema = await JsonSchema.FromUrlAsync("https://unpkg.com/@octokit/webhooks-schemas@4.2.1/schema.json");
var settings = new CSharpGeneratorSettings
{
    Namespace = "Octokit.Webhooks"
};
var generator = new CSharpGenerator(schema, settings);
var file = generator.GenerateFile()

I get this code, which is a subset of the types in the JSON schema definition.

The JSON schema definition is using draft 7, and I have seen #574, so I assume it might be something to do with that?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions