Type object
File match gaspar.config.json
Schema URL https://catalog.lintel.tools/schemas/schemastore/gaspar/latest.json
Source https://www.schemastore.org/gaspar-3.0.json

Versions

Validate with Lintel

npx @lintel/lintel check
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 TypeScript 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
GroupTypes Record<string, string[]>

Export names to run multiple outputs under a single name. e.g. Specify a group type called 'App' and add 'Swift' and 'Kotlin'

Examples: {"App":["Swift","Kotlin"]}
TypeTranslations Record<string, object>

For TypeScript, Angular, Swift, Kotlin and Proto, you can override type names to objects each language will understand.

Examples: {"TypeScript":{"IMyInterface":"Object"}}
GlobalTypeTranslations Record<string, string>

For TypeScript, Angular, Swift, Kotlin and Proto, you can override type names to objects the exported language will understand. These will apply equally to all exports, 'TypeTranslations' may be more useful

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