Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add go-emitter options description #1507

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 75 additions & 15 deletions packages/typespec-go/src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,81 @@ const EmitterOptionsSchema: JSONSchemaType<GoEmitterOptions> = {
type: 'object',
additionalProperties: true,
properties: {
'azcore-version': { type: 'string', nullable: true },
'disallow-unknown-fields': { type: 'boolean', nullable: true },
'file-prefix': { type: 'string', nullable: true },
'generate-fakes': { type: 'boolean', nullable: true },
'head-as-boolean': { type: 'boolean', nullable: true },
'inject-spans': { type: 'boolean', nullable: true },
'module': { type: 'string', nullable: true },
'module-version': { type: 'string', nullable: true },
'rawjson-as-bytes': { type: 'boolean', nullable: true },
'slice-elements-byval': { type: 'boolean', nullable: true },
'single-client': { type: 'boolean', nullable: true },
'stutter': { type: 'string', nullable: true },
'fix-const-stuttering': { type: 'boolean', nullable: true },
'generate-examples': { type: 'boolean', nullable: true },
'factory-gather-all-params': { type: 'boolean', nullable: true },
'azcore-version': {
type: 'string',
nullable: true,
description: 'Semantic version of azcore without the leading \'v\' to use if different from the default version (e.g. 1.2.3).',
},
'disallow-unknown-fields': {
type: 'boolean',
nullable: true,
description: 'When true, unmarshalers will return an error when an unknown field is encountered in the payload. The default is false.',
},
'file-prefix': {
type: 'string',
nullable: true,
description: 'Optional prefix to file names. For example, if you set your file prefix to "zzz_", all generated code files will begin with "zzz_".',
},
'generate-fakes': {
type: 'boolean',
nullable: true,
description: 'When true, enables generation of fake servers. The default is false.',
},
'head-as-boolean': {
type: 'boolean',
nullable: true,
description: 'When true, HEAD requests will return a boolean value based on the HTTP status code. The default is false.',
},
'inject-spans': {
type: 'boolean',
nullable: true,
description: 'Enables generation of spans for distributed tracing. The default is false.',
},
'module': {
type: 'string',
nullable: true,
description: 'The name of the Go module written to go.mod. Omit to skip go.mod generation. When module is specified, module-version must also be specified.',
},
'module-version': {
type: 'string',
nullable: true,
description: 'Semantic version of the Go module without the leading \'v\' written to constants.go. (e.g. 1.2.3). When module-version is specified, module must also be specified.',
},
'rawjson-as-bytes': {
type: 'boolean',
nullable: true,
description: 'When true, properties that are untyped (i.e. raw JSON) are exposed as []byte instead of any or map[string]any. The default is false.',
},
'slice-elements-byval': {
type: 'boolean',
nullable: true,
description: 'When true, slice elements will not be pointer-to-type. The default is false.',
},
'single-client': {
type: 'boolean',
nullable: true,
description: 'Indicates package has a single client. This will omit the Client prefix from options and response types. If multiple clients are detected, an error is returned. The default is false.',
},
'stutter': {
type: 'string',
nullable: true,
description: 'Uses the specified value to remove stuttering from types and funcs instead of the built-in algorithm.',
},
'fix-const-stuttering': {
type: 'boolean',
nullable: true,
description: 'When true, fix stuttering for `const` types and values. The default is false.',
},
'generate-examples': {
type: 'boolean',
nullable: true,
description: 'When true, generate example tests. The default is false.',
},
'factory-gather-all-params': {
type: 'boolean',
nullable: true,
description: 'When true, the NewClientFactory constructor gathers all parameters or only common parameters of clients. The default is false.',
},
},
required: [],
};
Expand Down