Schema URL

Type: object

Properties

$schema string
Models object

Options for outputting Models and Enums

5 nested properties
Output object[] required

Output options. You must supply at least one of these.

minItems=1
Include string[]

List of file locations containing the models or controllers you wish to translate. Optional, if not provided will use all .cs files in the project.

Default:
[
  "./**/*.cs"
]
Exclude string[]

List of file locations to exclude from the Include list

UseEnumValue boolean

Enums will be written with their value, either set directly or from an Attribute (e.g. [EnumMember(Value = "name")]).

Default: true
StringLiteralTypesInsteadOfEnums boolean

For TypeScript, if true will export enums as types instead of TS enums.

Default: false
Controllers object

Options for outputting service communication contracts for Controllers

6 nested properties
Output object[] required

Output options. You must supply at least one of these.

minItems=1
ServiceName string required

Used to name exported items, can also be used in paths.

minLength=1
Include string[]

List of file locations containing the models or controllers you wish to translate. Optional, if not provided will use all .cs files in the project.

Default:
[
  "./**/*.cs"
]
Exclude string[]

List of file locations to exclude from the Include list

ServiceHost string

Used by Ocelot Export, and can be used in paths. Typically set to 'http' or 'https'

ServicePort integer

Used by Ocelot Export, and can be used in paths.

min=1
CustomTypeTranslations Record<string, string>

For TypeScript and Angular, you can override type names to objects TypeScript will understand.

Examples: {"IMyInterface":"Object"}
IgnoreMissingOutputLocations boolean

If the file output location cannot be found, you will get a build error; add "IgnoreMissingOutputLocations": true to skip the error. This is useful when you need to build in an environment where the output may not be available (e.g. docker); although it would usually be preferable to use dotnet build /p:RunGaspar=False in your scripts.

Default: false
IgnoreAnnotations boolean

Set this to true to export all objects irrespective if they have [ExportFor] or not.

Default: false

Any of

1. variant
2. variant