--- title: Generator diagnostics | Stainless --- - 💀 **Fatal**: An issue that prevents code generation entirely. - ❌ **Error**: Undesired or unexpected behavior. Resolve all errors before a 0.0.1 release. - ⚠️ **Warning**: Potentially undesired or unexpected behavior. Resolve all warnings before a 1.0.0 release. - ✍️ **Note**: A potential improvement or misconfiguration. Investigate all notes before a 1.0.0 release. ## API ### ❌ [API/GitHubAppNotAuthorized](#API/GitHubAppNotAuthorized) > Failed to authorize with GitHub. > > {message} ## ClientOpt ### ⚠️ [ClientOpt/UnnecessarilyRequired](#ClientOpt/UnnecessarilyRequired) > `client_settings.opts.{client_opt_name}` is non-nullable, but isn't used in every `security` config, so it will be unnecessarily required in some cases. > > Set `nullable: true` on the option or use it in every `security` config . ### ⚠️ [ClientOpt/NotFound](#ClientOpt/NotFound) > `client_settings.opts.{client_opt_name}` does not exist. > > Use the name of a valid option in [`client_settings.opts`](https://www.stainless.com/docs/reference/config#client-opt) or set `client_settings.opts.{client_opt_name}` to a valid value. ## Config ### ❌ [Config/OpenAPIReferenceInvalid](#Config/OpenAPIReferenceInvalid) > {reason} ## Endpoint ### ❌ [Endpoint/NotHttp](#Endpoint/NotHttp) > `{endpoint}` is not an HTTP endpoint, but only HTTP endpoints are supported, so code will not be generated for it. > > An HTTP endpoint must contain: > > 1. `get`, `post`, `put`, `patch`, `delete` or `query` > 2. Then a space > 3. Then a path that begins with a `/` ### ❌ [Endpoint/NotFound](#Endpoint/NotFound) > `{endpoint}` was not found in the OpenAPI spec, so code will not be generated for it. ### ❌ [Endpoint/NotSpecified](#Endpoint/NotSpecified) > `{endpoint}` is in `unspecified_endpoints`, so code will not be generated for it. ### ❌ [Endpoint/BothSpecifiedAndUnspecified](#Endpoint/BothSpecifiedAndUnspecified) > `{endpoint}` is in `unspecified_endpoints`, but is specified in `resources`, so code will still be generated for it. > > An endpoint cannot be both specified and unspecified. Remove it from `unspecified_endpoints` or `resources`. ### ⚠️ [Endpoint/NotConfigured](#Endpoint/NotConfigured) > `{endpoint}` exists in the OpenAPI spec, but isn't specified in the Stainless config, so code will not be generated for it. ### ✍️ [Endpoint/IsIgnored](#Endpoint/IsIgnored) > `{endpoint}` is in `unspecified_endpoints`, so code will not be generated for it. > > If this is intentional, then ignore this note. Otherwise, remove the endpoint from `unspecified_endpoints` and add it to `resources`. ## Go ### ❌ [Go/DuplicateVariantNameForUnion](#Go/DuplicateVariantNameForUnion) > Variant names for union `{type_name}` at `{oas_path}` overlap, as we could not infer good unique names for the variants. > > These are the overlapping schemas: > > - `{variants.0}` > - `{variants.1}` > > You can assign better names to these schemas by assigning a `title` or making the variant a model. ### ❌ [Go/SnippetNotValid](#Go/SnippetNotValid) > This example snippet could not be formatted correctly. > > The snippet: > > ```go > {snippet} > ``` > > `stdout`: > > ```{stdout.lang} > {stdout.contents} > ``` > > `stderr`: > > ```{stderr.lang} > {stderr.contents} > ``` ### ⚠️ [Go/SchemaVariantRequiresDiscriminator](#Go/SchemaVariantRequiresDiscriminator) > Variant for union requires a property for discriminator `{discriminator_property_name}` ### ⚠️ [Go/SchemaVariantTypeNotSupported](#Go/SchemaVariantTypeNotSupported) > Variant type '{variant\_type}' is not currently supported ### ⚠️ [Go/NameNotAllowed](#Go/NameNotAllowed) > {reason} ### ✍️ [Go/MultipleFormatsInUnion](#Go/MultipleFormatsInUnion) > Multiple different schema formats found for variants of {oas\_path}: `{formats.0}`, `{formats.1}` ### ✍️ [Go/DuplicateVariantDeserializationConditions](#Go/DuplicateVariantDeserializationConditions) > This union schema has more than one variant with the same deserialization condition, so some of the variants may never be deserialized to. > > The following variants have the same deserialization condition: > > ``` > {conditions.0.representation}: gjson={conditions.0.gjson_value} discriminatorValue={conditions.0.discriminator_value} > {conditions.1.representation}: gjson={conditions.1.gjson_value} discriminatorValue={conditions.1.discriminator_value} > ``` > > Update these variants so that they can be differentiated during deserialization or remove all but one of them. ### ✍️ [Go/SchemaUnionDiscriminatorMissing](#Go/SchemaUnionDiscriminatorMissing) > This union schema has more than one object variant, but no [`discriminator`](https://www.stainless.com/docs/reference/openapi-support#discriminator) property, so deserializing the union may be inefficient or ambiguous. > > Deserializing this union schema requires trying to match it against each object variant in sequence, which may: > > - Be inefficient for large or many variants > - Result in ambiguities if two object variants have the same required properties > > Adding a `discriminator` property solves these problems because it immediately indicates which variant a serialized union should be deserialized to. > > If these problems don't apply to this union schema, the ignore this note. Otherwise, add a `discriminator` property. ## Java ### ❌ [Java/UnsupportedAliasModel](#Java/UnsupportedAliasModel) > We currently do not support generating alias models in Java/Kotlin. You will have to remove it from the config. ### ⚠️ [Java/NameNotAllowed](#Java/NameNotAllowed) > {reason} ### ⚠️ [Java/NameIsReserved](#Java/NameIsReserved) > This schema has a name that conflicts with a reserved name, so it will be renamed from `{name}` to `{new_name}`. > > Set a different name by doing one of: > > - Defining a [model](https://www.stainless.com/docs/guides/configure#models) > - Setting a `title` property on the schema > - Extracting the schema to `#/components/schemas` ### ⚠️ [Java/NestedAndParentClassNamesConflict](#Java/NestedAndParentClassNamesConflict) > This schema's class has the same name as one of its parent classes, so it will be renamed from `{class_name}` to `{new_class_name}`. > > Set a different name by doing one of: > > - Defining a [model](https://www.stainless.com/docs/guides/configure#models) > > - Setting a `title` property on the schema > > - Extracting the schema to `#/components/schemas` > > - Setting an `x-stainless-naming` property on the schema like so: > > ```yml > x-stainless-naming: > java: > type_name: NewClassName > ``` ### ✍️ [Java/SchemaUnionDiscriminatorMissing](#Java/SchemaUnionDiscriminatorMissing) > This union schema has more than one object variant, but no [`discriminator`](https://www.stainless.com/docs/reference/openapi-support#discriminator) property, so deserializing the union may be inefficient or ambiguous. > > Deserializing this union schema requires trying to match it against each object variant in sequence, which may: > > - Be inefficient for large or many variants > - Result in ambiguities if two object variants have the same required properties > > Adding a `discriminator` property solves these problems because it immediately indicates which variant a serialized union should be deserialized to. > > If these problems don't apply to this union schema, the ignore this note. Otherwise, add a `discriminator` property. ### ✍️ [Java/CollapsedUnionHasRedundantModel](#Java/CollapsedUnionHasRedundantModel) > This union collapses to its enum variant (`{collapsed_variant.stainless_path}`), but both are models, so only the enum model will be respected. > > Only define either the union or the enum variant as a model. ## Method ### ❌ [Method/InvalidBinaryUpload](#Method/InvalidBinaryUpload) > In binary file upload endpoint with content type {content\_type}, the file parameter schema must be a string with binary format and there were {num\_body\_params} body parameters instead of exactly one. ### ❌ [Method/NameNotValid](#Method/NameNotValid) > Method name invalid, please rename it: {reason} ### ❌ [Method/XStainlessInvalid](#Method/XStainlessInvalid) > The `x-stainless-method` config is invalid. > > {error} ### ⚠️ [Method/MatchedMultiplePages](#Method/MatchedMultiplePages) > Found multiple matching pagination schemes, `{pages.0}` and `{pages.1}`. Add an explicit `pagination: {page_name}` to the method definition to disambiguate. ### ⚠️ [Method/PaginatedWithoutMatchingScheme](#Method/PaginatedWithoutMatchingScheme) > `{path}` is paginated, but does not match any [pagination scheme](https://www.stainless.com/docs/configure/pagination), so it will not be interpreted as paginated. > > The method is paginated because its name starts with `list` or its [`paginated`](https://www.stainless.com/docs/reference/config#method) property is set to `true` in the Stainless config. > > If this is intentional, then add a pagination scheme for the method. Otherwise, remove its `paginated` property from the Stainless config or set its `paginated` property to `false` if the method's name starts with `list`. > > The following defined pagination schemes have issues: > > - `{results.0.page}`: > > - `{results.0.errors.0}` > - `{results.0.errors.1}` > > - `{results.1.page}`: > > - `{results.1.errors.0}` > - `{results.1.errors.1}` ### ⚠️ [Method/ExpectedMatchPaginationScheme](#Method/ExpectedMatchPaginationScheme) > Expected method to have matched [pagination scheme](https://www.stainless.com/docs/configure/pagination) {pagination\_scheme} because it was explicitly configured in the method config. > > Reasons why matching `{result.page}` failed: > > - result.errors.0 > - result.errors.1 > > There were matches of these other pagination styles: {other\_matches.0} and {other\_matches.1} ### ⚠️ [Method/ExpectedNoPagination](#Method/ExpectedNoPagination) > Expected method to have not matched a [pagination scheme](https://www.stainless.com/docs/configure/pagination) because {reason}. > > There were matches of these pagination styles: > > If the endpoint is paginated, you can disable this diagnostic by setting [paginated](https://www.stainless.com/docs/reference/config#method) to `true` in the method config. > > Example: > > ```yaml > methods: > my_method: > type: http > endpoint: get /examples > paginated: true > ``` By default Stainless expects methods for paginated endpoints to be prefixed with `list`. That's a simple and common convention that helps users understand that the method is paginated. If you have a use case for a paginated method that doesn't follow that convention, you can disable this diagnostic by setting [paginated](https://www.stainless.com/docs/reference/config#method) to `true` in the method config. ```yaml methods: my_method: type: http endpoint: get /examples paginated: true ``` ### ⚠️ [Method/MissingEnvelopeUnwrap](#Method/MissingEnvelopeUnwrap) > Expected envelope unwrap property `{unwrap_field}` specified by `settings.unwrap_response_fields` was expected to exist on the response object, but none was found so the raw response was used. > > The following fields were found on the response object: `{existing_properties.0}` and `{existing_properties.1}`. > > If this endpoint intentionally doesn't match a response envelope, you can disable matching for this endpoint by configuring the method at `{config_path}` to have `unwrap_field: false` ### ⚠️ [Method/AmbiguousEnvelopeUnwrap](#Method/AmbiguousEnvelopeUnwrap) > Multiple properties matched potential `unwrap_response` properties: `{matched_properties.0}` or `{matched_properties.1}`, so unwrapping the envelope has been disabled for this endpoint. > > Disambiguate which unwrap property to use by setting a specific property to use, (e.g. `unwrap_response: {matched_properties.0}` on the method config. ### ⚠️ [Method/PathNotValid](#Method/PathNotValid) > This method's path (`{path}`) doesn't start with `/`, so the method will be ignored. ### ⚠️ [Method/PathComponentMissingParameter](#Method/PathComponentMissingParameter) > This endpoint is missing a parameter for path component `{component}`. ### ⚠️ [Method/RequestBodyNotSupported](#Method/RequestBodyNotSupported) > The endpoint is a GET method but has a request body. This is not recommended and will crash for JS `fetch` users. > > This is usually a mistake in the spec, and can be resolved by removing the request body from the endpoint. If this is how your API works, we suggest you change your API, as some javascript runtimes do not support this, and neither does the Go standard library. ### ⚠️ [Method/XStainlessDuplicate](#Method/XStainlessDuplicate) > The `x-stainless-method` value `{method_path}` is already assigned to endpoint `{existing_endpoint}`, but is also trying to be assigned to `{new_endpoint}`. > > Each `x-stainless-method` value must be unique across all endpoints. Either rename one of the methods or remove the duplicate `x-stainless-method` extension. ### ⚠️ [Method/XStainlessAlreadyConfigured](#Method/XStainlessAlreadyConfigured) > The endpoint `{endpoint}` has `x-stainless-method`: `{method_path}`, but this method is already configured in the Stainless config. > > This method has been skipped as methods defined via `x-stainless-method` must be unique. > > Remove either this `x-stainless-method` annotation or the corresponding `methods` config entry. ### ⚠️ [Method/XStainlessInvalidSyntax](#Method/XStainlessInvalidSyntax) > The `x-stainless-method` value must be a dotted string, in the format `resource.method`, but got `{value}`. > > For example: `"users.list"` or `"accounts.users.create"`. ### ✍️ [Method/OptionalBinaryRequestBody](#Method/OptionalBinaryRequestBody) > In a binary file upload endpoint, the request body is always interpreted as required. ### ✍️ [Method/PathHasRepeatedComponent](#Method/PathHasRepeatedComponent) > This endpoint has duplicate path component `{component}` in the path `{endpoint}`, which may not be intended. ### ✍️ [Method/BodyRootParamUnnamed](#Method/BodyRootParamUnnamed) > This method has a non-object request body, so its argument's name in the generated code will be `{fallback_name}`. > > If `{fallback_name}` is an appropriate name, then ignore this note. Otherwise, set `body_param_name` in the [method config](https://www.stainless.com/docs/reference/config#method) to the desired name. ### ✍️ [Method/DefinesBaseURLWithMultipleEnvironments](#Method/DefinesBaseURLWithMultipleEnvironments) > {endpoint} defines an alternate server URL {url}, but the config defines more than one environment. Requests will always be sent to this alternate server URL, regardless of environment. ## Model ### ❌ [Model/NotFound](#Model/NotFound) > `{path}` was not found in the Stainless config, so it will be ignored. ### ❌ [Model/XStainlessInvalid](#Model/XStainlessInvalid) > The `x-stainless-model` config is invalid. > > {error} ### ❌ [Model/DuplicateName](#Model/DuplicateName) > Another model with name `{existing_model_name}` already exists. Models should always have a unique name, or a unique namespaced name under a resource declared as a `standalone_api`. ### ⚠️ [Model/XStainlessInvalidSyntax](#Model/XStainlessInvalidSyntax) > The `x-stainless-model` value must be a dotted string, in the format `resource.model`, but got `{value}`. > > For example: `"users.profile"` or `"accounts.users.user"`. ### ⚠️ [Model/DuplicateDefinition](#Model/DuplicateDefinition) > Schema `{ref_name}` is already declared as a model at `{existing_model_name}`; One of the model definitions should be removed. ### ⚠️ [Model/ParamsSuffixNameClash](#Model/ParamsSuffixNameClash) > Model config `no_params_suffix` is set to `true` but the schema is used in a response so removing the suffix would cause a name clash. ### ✍️ [Model/IsIndirect](#Model/IsIndirect) > `{config_path}` references a schema that has `$ref: {schema_ref}`, but could potentially reference `{schema_ref}` directly. > > If this is for naming or other purposes, then ignore this note. Otherwise, consider referencing `{schema_ref}` directly for clarity. ### ✍️ [Model/IsConstant](#Model/IsConstant) > This schema has only one possible value, but it's a model, so it won't be automatically set as the default value for the user. > > If the schema may have more possible values in the future, then ignore this note. Otherwise, don't define it as a model. Some SDKs conveniently set constant non-model schemas as the default for the user. > > This schema's only possible value is the following: > > ``` > "{constant}" > ``` ### ✍️ [Model/Recommended](#Model/Recommended) > `{oas_path}` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/{recommended_resource_path.0}/subresources/{recommended_resource_path.1}`. > > The duplicated schema definition is not defined as a model so it will be duplicated in the generated code, even if the schema definition is shared using a `$ref`. > > If this is intentional, then ignore this note. Otherwise, consider defining the schema as a model so that it's defined once in the generated code, and then referenced multiple times. ### ✍️ [Model/NeedsRename](#Model/NeedsRename) > Consider renaming model `{model.raw_name}`; e.g. `{suggestion}`' ## Name ### ⚠️ [Name/Renamed](#Name/Renamed) > 2 preferred names could not be used due to `{language}` constraints, so a fallback name, `{fallback_name}`, will be used instead. > > These preferred names were tried in order, but could not be used for the following reasons: > > 1. `{renamings.0.preferred_name}` `{renamings.0.reason}` (`{renamings.0.conflicting_name_location}`) > 2. `{renamings.1.preferred_name}` `{renamings.1.reason}` (`{renamings.1.conflicting_name_location}`) > > These preferred names were made up of other names: > > - diagrams.0 > - diagrams.1 ### ✍️ [Name/NotSnakeCase](#Name/NotSnakeCase) > `{name}` is not in snake\_case format. Consider renaming to `{snake_case_name}`. ## OAS ### ❌ [OAS/ReferenceNotFound](#OAS/ReferenceNotFound) > Reference pointed to by {ref\_location} is missing from spec: {missing\_pointer} ### ❌ [OAS/NotValid](#OAS/NotValid) > `{oas_path}` has an invalid shape: {reason} ### ✍️ [OAS/InvalidExample](#OAS/InvalidExample) > Example is not valid for schema > > Example: `"{value}"` > > {reason} ### ✍️ [OAS/InvalidUnionExample](#OAS/InvalidUnionExample) > Could not find matching variant for the given example `"{example}"` ## Pagination ### ❌ [Pagination/MissingProperty](#Pagination/MissingProperty) > Could not infer a response property with a '{purpose}' purpose as there were 2 applicable properties `{inferred_schemas.0.schema_ref.property_info.api_name}` and `{inferred_schemas.1.schema_ref.property_info.api_name}`. > > You need to explicitly declare which response property should be used {used\_for}. For example: > > ```yaml > {in}: > {example} > ``` ### ❌ [Pagination/UnsupportedPurposePlacement](#Pagination/UnsupportedPurposePlacement) > Explicit pagination purpose '{purpose}' can only be set for schemas within object properties but it was set on a schema with a {schema.parent.type} parent. ### ❌ [Pagination/UnsupportedItemsSchemaType](#Pagination/UnsupportedItemsSchemaType) > The paginated items schema must be an 'array' type, received '{schema.type}'. ### ❌ [Pagination/UnusedPurposeConfig](#Pagination/UnusedPurposeConfig) > Explicit pagination purpose config is defined but it was not used. Is '{schema.raw\_schema.x\_stainless\_pagination\_property.purpose}' a supported purpose for the '{page.type}' pagination type? ### ❌ [Pagination/DuplicatePurpose](#Pagination/DuplicatePurpose) > Pagination purpose '{purpose}' should only be defined once but it was defined {amount} times. ### ❌ [Pagination/ExpectedItemsToBeObject](#Pagination/ExpectedItemsToBeObject) > Expected paginated items schema to be an 'object' type. ### ❌ [Pagination/ExpectedHasNextPageToBeBoolean](#Pagination/ExpectedHasNextPageToBeBoolean) > Expected paginated response field `{property_name}` to be a `boolean` type. ### ⚠️ [Pagination/DuplicateName](#Pagination/DuplicateName) > A pagination config with the name `{name}` was declared multiple times. > > These pagination configs conflict with each other: > > ```yaml > pagination: > {indices.0}: { name: {name}, … } > {indices.1}: { name: {name}, … } > ``` ### ✍️ [Pagination/NotConfigured](#Pagination/NotConfigured) > Pagination for your SDKs have not been configured. See [our configuration guide](https://www.stainless.com/docs/configure/pagination) for more information. ## Parameter ### ❌ [Parameter/SchemaTypeNotValid](#Parameter/SchemaTypeNotValid) > Schema type `{type}` is not a valid path param type; Expected one of {supported\_types.0} or {supported\_types.1} ### ⚠️ [Parameter/NotFound](#Parameter/NotFound) > Got an unknown param in positional\_params: `{path}` ### ⚠️ [Parameter/NotValid](#Parameter/NotValid) > {reason} ### ⚠️ [Parameter/MissingName](#Parameter/MissingName) > The parameter `name` is missing or empty. It should be given a name. ### ⚠️ [Parameter/DuplicateNames](#Parameter/DuplicateNames) > Multiple parameters have the same SDK identifier of `{name}`, so they will be renamed. > > Rename the following parameters using `x-stainless-param`: > > - `{params.0.oas_ref}` > - `{params.1.oas_ref}` > > For example: > > ```yml > name: {params.0.property_info.sdk_name} > in: {params.0.param_location} > # ... > x-stainless-param: other_{name} > ``` ### ⚠️ [Parameter/MissingSchema](#Parameter/MissingSchema) > No schema for parameter is defined, assuming it's a schema of `type: string` ### ✍️ [Parameter/NameHasBrackets](#Parameter/NameHasBrackets) > Parameter has supplied name `{parameter_name}`, the trailing `[]` was stripped for the SDK parameter name. ### ✍️ [Parameter/HeaderIsNullable](#Parameter/HeaderIsNullable) > This header parameter has `type: null` or `nullable: true`, which is unsupported, so it will not be interpreted as nullable. > > A header parameter can be optionally sent, which is configured by the [`required` property](https://swagger.io/docs/specification/v3_0/describing-parameters/#required-and-optional-parameters), but it cannot be sent as `null`. > > Make the header parameter optional and non-nullable instead. ### ✍️ [Parameter/PathIsNullable](#Parameter/PathIsNullable) > This path parameter has `type: null` or `nullable: true`, which is unsupported, so it will not be interpreted as nullable. ### ✍️ [Parameter/PathIsOptional](#Parameter/PathIsOptional) > This path parameter has `required: false`, which is unsupported, so it will not be interpreted as optional. ## Python ### ❌ [Python/PackageNameNotAllowed](#Python/PackageNameNotAllowed) > The package name `{package_name}` contains illegal characters, so they will be replaced with `_`. > > Python doesn't allow for `-`, `@` or `/` in import names. You must remove these characters. > > You can specify a different name for PyPi and imports with this config: > > ```yaml > python: > project_name: 'pypi-name' # e.g. `pip install pypi-name` > package_name: 'import_name' # e.g. `import import_name` > ``` ### ❌ [Python/RequestParamShadowsDefault](#Python/RequestParamShadowsDefault) > Request param '{name}' would shadow a request option with the same name ### ⚠️ [Python/PyPiPackageNameDeprecated](#Python/PyPiPackageNameDeprecated) > `targets.python.publish.pypi.package_name` is deprecated, please remove it in favour of `targets.python.project_name` ### ⚠️ [Python/NameNotAllowed](#Python/NameNotAllowed) > {reason} ### ⚠️ [Python/DuplicateDeclaration](#Python/DuplicateDeclaration) > We generated two separated types under the same name: `{typename}`. If they are the referring to the same type, they should be extracted to the same ref and be declared as a model. Otherwise, they should be renamed with `x-stainless-naming` ## QuerySettings ### ⚠️ [QuerySettings/BracketsFormatMustBeSet](#QuerySettings/BracketsFormatMustBeSet) > Your OpenAPI spec names array query params with brackets (e.g `my_param[]`). Stainless supports different ways to specify arrays in query params. To support brackets, configure `query_settings.array_format: brackets` in the Stainless config. ## Readme ### ⚠️ [Readme/MissingStreamingSnippet](#Readme/MissingStreamingSnippet) > Streaming has been configured but there is no `readme.example_requests.streaming` snippet defined ### ⚠️ [Readme/MissingPaginationSnippet](#Readme/MissingPaginationSnippet) > Pagination has been configured but there is no `readme.example_requests.pagination` snippet defined ## ReadmeExample ### ❌ [ReadmeExample/CustomConfigNotValid](#ReadmeExample/CustomConfigNotValid) > run\_check\_in\_path set to true but no path given - {check} ### ⚠️ [ReadmeExample/MethodNotPaginated](#ReadmeExample/MethodNotPaginated) > Expected method `{method.name}` to be paginated ### ⚠️ [ReadmeExample/MethodNotStreaming](#ReadmeExample/MethodNotStreaming) > Expected method `{method.name}` to be streamed ### ⚠️ [ReadmeExample/MissingNestedParam](#ReadmeExample/MissingNestedParam) > Expected the given example params to include a nested object but couldn't find one. Try using the \`\` endpoint with nested parameter `{suggestion.key}`. ### ✍️ [ReadmeExample/MissingParam](#ReadmeExample/MissingParam) > Expected required parameter `{key}` to have been supplied ### ✍️ [ReadmeExample/InvalidParameter](#ReadmeExample/InvalidParameter) > Value provided for parameter `{parameter}` doesn't match its schema. > > The following value was provided: > > ``` > "{val}" > ``` ### ✍️ [ReadmeExample/ReadOnlyProperty](#ReadmeExample/ReadOnlyProperty) > A value was provided for read-only property `{prop}`, but requests shouldn't include read-only properties. > > The following value was provided: > > ``` > "{val}" > ``` ### ✍️ [ReadmeExample/UnknownProperty](#ReadmeExample/UnknownProperty) > Example supplied parameter `{extra_param}` which does not exist for method `{method.name}`. ### ✍️ [ReadmeExample/UnknownResponseProperty](#ReadmeExample/UnknownResponseProperty) > Response property `{response_property}` is not defined on the response for method `{method.name}`. ## Reference ### ❌ [Reference/NotFound](#Reference/NotFound) > `{ref}` was not found in the OpenAPI spec, so it will be ignored. > > Did you mean `{closest_ref}`? ### ❌ [Reference/NotASchema](#Reference/NotASchema) > `{path}` resolved to a value that doesn't look like a schema: `"{value}"`. ## Resource ### ❌ [Resource/NotFound](#Resource/NotFound) > `{path}` was not found in the Stainless config, so it will be ignored. ### ❌ [Resource/HasEmptyName](#Resource/HasEmptyName) > Resource at `{path}` has an empty or whitespace-only name, which is not allowed. > > The resource has been automatically renamed to {fallback\_name}. ### ❌ [Resource/HasConflict](#Resource/HasConflict) > `p` has a name that conflicts with one or more resources, which may cause errors in the generated code. > > Merge these resources into one to resolve the error: > > - `{paths.0}` > - `{paths.1}` ## Response ### ❌ [Response/TypeNotObjectForEnvelope](#Response/TypeNotObjectForEnvelope) > `unwrap_response_fields` has been set but the method's response type is `{response_type}` not `object`. > > Envelope unwrapping only supports top-level response schemas with `type: object` and `type: allOf`. You may want to re-define the response schema, or turn off response unwrapping for this method by setting `unwrap_response` to false. ### ❌ [Response/UnsupportedHeaderType](#Response/UnsupportedHeaderType) > Unexpected non-primitive type: `{type}` for response header schema: `{name}` ### ✍️ [Response/UnsupportedContentType](#Response/UnsupportedContentType) > Did not find a supported operation response content type; Received {content\_types.0} and {content\_types.1} ### ✍️ [Response/SchemaTypeNotValidForText](#Response/SchemaTypeNotValidForText) > Expected schema with `type: 'string'` for content type {content\_type} ## Ruby ### ❌ [Ruby/PaginationTypeUnsupported](#Ruby/PaginationTypeUnsupported) > The Ruby SDK generator does not yet support `{type}` pagination ### ❌ [Ruby/UnexpectedParams](#Ruby/UnexpectedParams) > Unable to generate a method corresponding to the params in this method ### ⚠️ [Ruby/UnimplementedType](#Ruby/UnimplementedType) > The Ruby SDK generator is not yet able to emit code for type `{schema.type}`; values will be passed through as-is and documented as `Object` for now ### ⚠️ [Ruby/MultipleNamedModelsInIntersection](#Ruby/MultipleNamedModelsInIntersection) > Multiple named models found in intersection, currently only 1 named model is supported: - `{model_names.0}` - `{model_names.1}` ### ⚠️ [Ruby/NameShadowedBuiltin](#Ruby/NameShadowedBuiltin) > Renamed Ruby method from "{name}" to "{new\_name}" to avoid shadowing a built-in method. > > Please rename it using the ['renameValue' transform](https://www.stainless.com/docs/guides/configure#openapi-transformations). ### ⚠️ [Ruby/NameNotAllowed](#Ruby/NameNotAllowed) > Renamed illegal Ruby identifier from "{name}" to "{new\_name}", because {reason}. > > Please rename it using the ['renameValue' transform](https://www.stainless.com/docs/guides/configure#openapi-transformations). ### ⚠️ [Ruby/DuplicateEnumName](#Ruby/DuplicateEnumName) > Multiple enum members found with the same Ruby name "{name}", the duplicates have been renamed to avoid collisions ### ✍️ [Ruby/UnnamedType](#Ruby/UnnamedType) > The Ruby SDK generator is not yet able to pick a meaningful name for this type, will use `{generated_name}` for now ## Schema ### ❌ [Schema/InconsistentEnumMembers](#Schema/InconsistentEnumMembers) > Inconsistent enum member type encountered, expected {expected\_type} but received object > > To fix this issue, ensure all enum values have the same type. Either convert all values to {expected\_type} or update the schema's `type` field to match the actual enum values. ### ❌ [Schema/RecursiveMustBeModel](#Schema/RecursiveMustBeModel) > Schema `$ref: '{recursive_ref_name}'` is recursively referenced and should be added as a model to the Stainless config. ### ❌ [Schema/DirectlyReferencesSelf](#Schema/DirectlyReferencesSelf) > This schema references itself directly via its `{combinator}` key, so the self-referential entries will be ignored. > > The schema contains direct recursive references to itself, so the following entries are ignored: > > - `{recursive_indices.0}` > - `{recursive_indices.1}` > > Consider restructuring the schema to avoid self-references. Self-referential schemas (schemas that reference themselves) have limited support. When encountered, only specific variants containing these self-references will be used, which may result in incomplete type definitions. Example of a self-referential schema: ```yaml components: schemas: Node: oneOf: - type: string - $ref: '#/components/schemas/Node' ``` ### ❌ [Schema/ExternalReference](#Schema/ExternalReference) > Schema $ref "{ref\_name}" could not be resolved, is it an external reference? e.g. file or url ### ❌ [Schema/TypeNotValid](#Schema/TypeNotValid) > Schema type `{type}` is not a part of the JSON Schema specification and not supported by Stainless. ### ❌ [Schema/CannotInferEnumMemberName](#Schema/CannotInferEnumMemberName) > Could not generate name for enum member `{member_name}` in language {language} ### ⚠️ [Schema/DiscriminatedUnionVariantMissingProperty](#Schema/DiscriminatedUnionVariantMissingProperty) > Union variant doesn't define the property discriminator `{property_name}` which is required as the union schema defines `discriminator.propertyName` ### ⚠️ [Schema/EnumIsAmbiguous](#Schema/EnumIsAmbiguous) > Schema defines an `enum` property that only includes `null`. > > Either at least one member should be added, or use `nullable: true` or `type: null` instead of `enum`. ### ⚠️ [Schema/ConstEnumHasMultipleMembers](#Schema/ConstEnumHasMultipleMembers) > This enum schema is marked as `x-stainless-const: true`, but has multiple members, so it will not be interpreted as [`const`](https://json-schema.org/understanding-json-schema/reference/const). > > Remove all but one member or don't mark the enum as `x-stainless-const: true`. ### ⚠️ [Schema/ConstAndEnumMismatch](#Schema/ConstAndEnumMismatch) > This enum schema has both `enum` and `const` properties, but with different values, so the `enum` property will be ignored. ### ⚠️ [Schema/TypeMissing](#Schema/TypeMissing) > Schema is missing a `type` property, and it was not automatically inferred. ### ⚠️ [Schema/PatternNotValid](#Schema/PatternNotValid) > `{pattern}` is invalid, unsupported, or conflicts with this schema's `minLength` or `maxLength`, so it will be ignored, which could cause generated tests to fail. > > Fix the regex pattern or remove it using the [`removePatterns` transform](https://www.stainless.com/docs/guides/configure#openapi-transformations). ### ⚠️ [Schema/DeprecationMessageWithoutDeprecation](#Schema/DeprecationMessageWithoutDeprecation) > This schema has an `x-stainless-deprecation-message`, but it is not `deprecated`, so the message will have no effect. > > Remove `x-stainless-deprecation-message` or add `deprecated: true`. ### ⚠️ [Schema/EnumDescriptionNotValid](#Schema/EnumDescriptionNotValid) > {reason} ### ⚠️ [Schema/CannotInferName](#Schema/CannotInferName) > This schema's name could not be inferred, so it will be given an arbitrary placeholder name in the generated code. > > Set a name by doing one of: > > - Defining a [model](https://www.stainless.com/docs/guides/configure#models) > - Setting a `title` property on the schema > - Extracting the schema to `#/components/schemas` For some schemas, the Stainless code generator cannot infer a name without additional information. This is usually because the schema is too complex or ambiguous. For example, consider a schema that represents a string or an object: ```yaml oneOf: - type: string - type: object properties: id: type: string name: type: string ``` Some languages may need an explicit name for the object, but it's not clear what to call it. ### ⚠️ [Schema/CannotInferUnionVariantName](#Schema/CannotInferUnionVariantName) > This union variant's name could not be inferred, so it will be given an arbitrary placeholder name in the generated code. > > Set a name by doing one of: > > - Defining a [model](https://www.stainless.com/docs/guides/configure#models) > - Setting a `title` property on the schema > - Extracting the schema to `#/components/schemas` > - Setting an `x-stainless-variantName` property on the schema For some union variants, the Stainless code generator cannot infer a name without additional information. This is usually because the union is too complex or ambiguous. For example, consider a union schema that represents one of: - A string - An array of string arrays or strings ```yaml oneOf: - type: string - type: array items: oneOf: - type: array items: type: string - type: string ``` Some languages may need an explicit name for the "array of string arrays or strings" variant, but it's not clear what to call it. ### ✍️ [Schema/ObjectHasNoProperties](#Schema/ObjectHasNoProperties) > `{oas_path}` has neither `properties` nor `additionalProperties` so its type has been interpreted as `unknown`. > > If the schema should be a map, then add [`additionalProperties`](https://json-schema.org/understanding-json-schema/reference/object#additionalproperties) to it. > > If the schema should be an empty object type, then add `x-stainless-empty-object: true` to it. A schema with just `type: object` and no other information is not interpreted as an empty object type. ### ✍️ [Schema/EnumHasOneMember](#Schema/EnumHasOneMember) > This enum schema has just one member, so it could be defined using [`const`](https://json-schema.org/understanding-json-schema/reference/const). > > If the enum schema may have more members in the future, then ignore this note. Otherwise, define the schema using `const`. Some SDKs conveniently set `const` properties as the default for the user. > > If you can't switch the schema to `const`, but want the SDK to treat it like one, then add `x-stainless-const: true` to the schema instead. ### ✍️ [Schema/IsAmbiguous](#Schema/IsAmbiguous) > `{oas_path}` does not have at least one of `type`, `oneOf`, `anyOf`, or `allOf`, so its type has been interpreted as `unknown`. > > If the schema should have a specific type, then add `type` to it. > > If the schema should accept anything, then add [`x-stainless-any: true`](https://www.stainless.com/docs/reference/openapi-support#unknown-and-any) to suppress this note. If there are many such schemas, then use the [`replaceMatchingSchemas` transform](https://www.stainless.com/docs/guides/configure#openapi-transformations) to update them all. ### ✍️ [Schema/EnumMemberTypeNotValid](#Schema/EnumMemberTypeNotValid) > Enum member has type `"{member_type}"` which is not a primitive type. > > To fix, you may want to use a `oneOf` or `anyOf` instead of an `enum` definition. ### ✍️ [Schema/EnumDuplicateMembers](#Schema/EnumDuplicateMembers) > This enum has duplicate members; `{duplicates.0.value}` and `{duplicates.1.value}`; so they will be ignored. ### ✍️ [Schema/RequiredPropertyNotDefined](#Schema/RequiredPropertyNotDefined) > This schema marks `{unknown_required_props.0}` and `{unknown_required_props.1}` as `required`, but they aren't defined in `properties`, so they will be ignored. > > Remove the properties from `required` or define them in `properties`. ### ✍️ [Schema/MultipleEnumMemberTypes](#Schema/MultipleEnumMemberTypes) > Found enum members with different types ("{member\_types.0}" and "{member\_types.1}"). To fix, this should likely be an `anyOf` instead. ### ✍️ [Schema/DeprecatedWithoutMessage](#Schema/DeprecatedWithoutMessage) > This schema has been marked deprecated with `deprecated: true`, but no deprecation message has been supplied by `x-stainless-deprecation-message`. > > Add `x-stainless-deprecation-message: ` or remove `deprecated: true`. ### ✍️ [Schema/StringFormatNotSupported](#Schema/StringFormatNotSupported) > `{oas_path}` specifies `format: {format}`, which is unsupported, so the `format` property will be ignored. > > A string schema's `format` property can be set to `binary`, `byte`, `date`, `date-time`, `time`, `uri` or `uuid`. > > If this is for documentation or other purposes, then ignore this note. Otherwise, remove the property or specify a supported `format`. ### ✍️ [Schema/ArrayMissingItems](#Schema/ArrayMissingItems) > Schema has `type: array` but is missing an items definition ## Security ### ❌ [Security/SchemeNotFound](#Security/SchemeNotFound) > Could not find security scheme: {security\_scheme\_name} ### ❌ [Security/InvalidSchemeRole](#Security/InvalidSchemeRole) > `{invalid_role}` is not a valid `auth.role` for `security_scheme` `{security_scheme_name}`. > > `{security_scheme_name}`'s `auth.role` can be set to `{valid_roles.0}` or `{valid_roles.1}`. ### ⚠️ [Security/DigestAuthNotSupported](#Security/DigestAuthNotSupported) > Digest authentication is not yet supported for the {unsupported\_targets.0} and {unsupported\_targets.1} SDKs. Please contact with your use-case, and we'll work on adding support. ### ⚠️ [Security/SchemeNotValid](#Security/SchemeNotValid) > Invalid security scheme `{security_scheme_name}`: {reason} ### ✍️ [Security/MissingConfiguration](#Security/MissingConfiguration) > No valid root-level 'security' section in your Stainless config or OpenAPI specification files, so authentication is not configured for your SDKs. See for details. ## Streaming ### ❌ [Streaming/UnsupportedParamsStructure](#Streaming/UnsupportedParamsStructure) > Streaming method uses a union type for request params which is not supported yet. ### ⚠️ [Streaming/DuplicateFallthroughEvents](#Streaming/DuplicateFallthroughEvents) > Multiple `kind: fallthrough` streaming events were declared, so they will all be ignored. > > ```yaml > on_event: > {indices.0}: { kind: fallthrough, … } > {indices.1}: { kind: fallthrough, … } > ``` ### ⚠️ [Streaming/ConflictingEventTypeHandling](#Streaming/ConflictingEventTypeHandling) > Multiple handlers of `event_type: {event_type}` were declared, so they will all be ignored. > > The following handlers were declared for `{event_type}`: > > - `{handlers.0}` > - `{handlers.1}` ### ✍️ [Streaming/CannotInferParamsName](#Streaming/CannotInferParamsName) > No model name, `$ref` or `streaming.param_type_name` defined - using default params type name ## Terraform ### ❌ [Terraform/ResourceCannotBeInferred](#Terraform/ResourceCannotBeInferred) > ({resource\_name}) {detail} ### ❌ [Terraform/ResourceHasAmbiguousProperties](#Terraform/ResourceHasAmbiguousProperties) > ({resource\_name}) resource has some properties with an undefined type, which results in a raw JSON field. To resolve, add type annotations to the following properties: > > - {properties.0} > - {properties.1} ### ❌ [Terraform/UnknownInUnion](#Terraform/UnknownInUnion) > One of the variants in a union has an undefined type, so it was omitted. Add type annotations to the variant have it included, or use x-stainless-skip to omit the variant explicitly. ### ⚠️ [Terraform/UnsupportedRequest](#Terraform/UnsupportedRequest) > ({resource\_name}) resource has an unsupported request type ({request\_type}) in method {method.name}. Supported response types are: {supported\_request\_types.0}, {supported\_request\_types.1}. ### ⚠️ [Terraform/UnsupportedResponse](#Terraform/UnsupportedResponse) > ({resource\_name}) resource has an unsupported response type ({response\_type}) in method {method.name}, and will be ignored. Supported response types are: {supported\_response\_types.0}, {supported\_response\_types.1}. ### ⚠️ [Terraform/UnsupportedDeleteBehaviorUnspecified](#Terraform/UnsupportedDeleteBehaviorUnspecified) > ({resource\_name}) Could not find a delete operation. If the resource does not support deletion, provide a value for 'unsupported\_delete\_behavior'. ### ⚠️ [Terraform/ResourceHasNamingCollision](#Terraform/ResourceHasNamingCollision) > ({resource.name}) resource has a property with the name "{conflicting\_name}" which conflicts with the name of the "{name}" {attribute\_type} attribute. As an interim measure, To resolve, please {customer\_action}. ### ⚠️ [Terraform/DataSourceAttributeTypeMismatch](#Terraform/DataSourceAttributeTypeMismatch) > This resource has conflicting types between request and response for attribute `{attribute_name}`, so the request type will be used. ### ⚠️ [Terraform/UnsupportedQueryType](#Terraform/UnsupportedQueryType) > ({resource.name}) resource has a property "{attribute\_name}" of type "{type}" which is currently unsupported in Terraform. ### ⚠️ [Terraform/XStainlessAlwaysSendInvalid](#Terraform/XStainlessAlwaysSendInvalid) > The `x-stainless-terraform-always-send` extension is not permitted for property `{attribute_name}` and will be ignored. > > This extension is only valid on computed and computed optional attributes with primitive types. The `{attribute_name}` property has type `{type}` and configurability `{configurability}`. ### ⚠️ [Terraform/XStainlessConfigurabilityInvalid](#Terraform/XStainlessConfigurabilityInvalid) > The `x-stainless-terraform-configurability` value `{configurability}` is not allowed (possible values are: `required`, `computed`, `optional`, `computed_optional`). ### ⚠️ [Terraform/XStainlessCollectionInvalid](#Terraform/XStainlessCollectionInvalid) > The `x-stainless-collection-type` extension is not permitted for this property and will be ignored. > > This extension is only permitted on properties with type `array`, but this property has type `{schema.type}`. ### ✍️ [Terraform/PotentiallyConfusingPaginationAttribute](#Terraform/PotentiallyConfusingPaginationAttribute) > ({resource.name}) resource has a property with the name "{attribute\_name}" which could be a pagination attribute that should be abstracted away in Terraform. ## Transform ### ❌ [Transform/Failed](#Transform/Failed) > Transformation {command} at step {step} exited with a failure > > {message} ### ✍️ [Transform/Useless](#Transform/Useless) > Transformation {command} had no effect on the OpenAPI schema and can safely be removed. ## TypeScript ### ❌ [TypeScript/NpmPackageNameNotValid](#TypeScript/NpmPackageNameNotValid) > The npm package name `{package_name}` is not [valid](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#name), so `{fallback_package_name}` will be used instead. ## Unsupported ### ❌ [Unsupported/MixOfArrayQueryParamFormat](#Unsupported/MixOfArrayQueryParamFormat) > The OpenAPI spec has a mixture of bracket and non-bracket query params, which is not supported by Stainless. ### ⚠️ [Unsupported/WebsocketEventVariantIsNotAnObject](#Unsupported/WebsocketEventVariantIsNotAnObject) > The event schema type (`{schema.type}`) is not `object`, this event variant will be skipped. ### ⚠️ [Unsupported/WebsocketEventDiscriminatorValue](#Unsupported/WebsocketEventDiscriminatorValue) > The event schema discriminator value (`{value}`) is not a `string`, no types will be generated for it. ### ⚠️ [Unsupported/SkipAndOnly](#Unsupported/SkipAndOnly) > Both `skip` and `only` are specified, but only `skip` will be respected. > > Only one of `skip` and `only` can specified at once. ### ✍️ [Unsupported/StubMethod](#Unsupported/StubMethod) > Stub methods are not currently supported for {language} ### ✍️ [Unsupported/WebhookUnwrap](#Unsupported/WebhookUnwrap) > Webhook unwrap method tests are not currently supported for {language} ### ✍️ [Unsupported/WebsocketMethod](#Unsupported/WebsocketMethod) > Websocket methods are not currently supported for {language} ## Websocket ### ❌ [Websocket/EventSchemaIsNotAUnion](#Websocket/EventSchemaIsNotAUnion) > The event schema type (`{schema.type}`) is not a union, no {from} event types will be generated. ### ❌ [Websocket/EventSchemaIsNotADiscriminatedUnion](#Websocket/EventSchemaIsNotADiscriminatedUnion) > The event schema type (`{schema.type}`) is a union but it is not discriminated, no {from} event types will be generated. > > You can mark a union schema as discriminated with the `discriminator` property: > > ```yaml > oneOf: > - $ref: '#/components/schemas/StartEvent' > - $ref: '#/components/schemas/EndEvent' > discriminator: > propertyName: 'type' > ``` ### ⚠️ [Websocket/EventMissingDiscriminator](#Websocket/EventMissingDiscriminator) > The event schema is missing the (`{discriminator_property}`) property, this event will not be generated. ### ⚠️ [Websocket/EventDiscriminatorNotAnEnum](#Websocket/EventDiscriminatorNotAnEnum) > The event schema discriminator property type (`{schema.type}`) is not an `enum` type, this event will not be generated. ## Misc ### 💀 [BuildCommandError](#BuildCommandError) > A build command reported issues: {command} ### 💀 [BootstrapCommandError](#BootstrapCommandError) > A bootstrap command reported an error: {command} ### 💀 [FormatterCommandError](#FormatterCommandError) > A formatter reported an error: {command} ### 💀 [FatalError](#FatalError) > Fatal error while generating code ### 💀 [OpenAPISpecFatalError](#OpenAPISpecFatalError) > Failed to parse OpenAPI spec ### ❌ [LinterCommandError](#LinterCommandError) > A linter reported issues: {command} ### ❌ [TestCommandError](#TestCommandError) > A test command reported an error: {command} ### ❌ [LinkCommandError](#LinkCommandError) > A link command reported an error: {command} ### ❌ [UnlinkCommandError](#UnlinkCommandError) > A link command reported an error: {command} ### ❌ [InvalidInternalState](#InvalidInternalState) > {error.message}