Generator diagnostics and errors
Errors
An error leads to undesired or unexpected behavior if not resolved. You should resolve all errors prior to moving into a 0.0.1 release.
ClientOptNotFound
Could not find client opt: ...
ClientOptNotValid
Invalid client opt at 'client_settings.opts....': ...
CustomExampleConfigNotValid
...
CustomSnippetNotFound
Cannot find custom snippet '...' for language '...'
CustomSnippetNotFoundInLanguage
Expected '...' snippet to have a ... definition but it could not be found
EndpointNotFound
Could not find the endpoint
...
in the OpenAPI spec.EndpointNotUnmapped
Endpoint
...
is inunspecified_endpoints
, but is actually specified in theresources
section of the Stainless configExpectedCustomMethod
Method at
...
is not a custom method.InvalidInternalState
...
MethodInvalidName
Method name invalid, please rename it: ...
MethodNotFound
Could not resolve method named '...`
MissingStreamingFeature
Method has streaming configured but streaming is not enabled yet. You will need to add 'streaming' to the features in the ... package config.
ModelInvalidPath
Model path for
...
resolved to a value that doesn't look like a schema object, ...ModelNotFound
Could not find a model at path
...
PaginationCouldNotInferPurpose
PaginationDuplicatePurpose
Pagination purpose '...' should only be defined once but it was defined ... times.
PaginationExpectedCursorIDObjectItems
Expected paginated items schema to be an 'object' type.
PaginationItemsFieldNotFound
Could not infer paginated data field for page: '...'.
PaginationModelNotFound
Unexpected: schema isPaginated but cannot find its response model ...
PaginationUnsupportedItemsSchemaType
The paginated items schema must be an 'array' type, received '...'.
PaginationUnsupportedPurposePlacement
Explicit pagination purpose '...' can only be set for schemas within object properties ....
PaginationUnusedPurposeConfig
Explicit pagination purpose config is defined but it was not used.
ParameterInvalidSchemaType
Schema type '...' is not a valid path param type; Expected one of ...
ParametersNotConsistent
OpenAPI inconsistency: implies a different set of parameters than the parameters object: ... vs ...
ReferenceNotFound
Cannot find schema "#/components/schemas/undefined" in OpenAPI spec
ResourceNotFound
Could not find resource
...
SchemaCannotInferName
Could not generate name for schema in ...; This is likely a bug in codegen.
SchemaEnumMemberCannotInferName
Could not generate name for enum member:
...
in language ...SchemaInconsistentEnumMembers
Inconsistent enum member type encountered, expected ... but received ...
SchemaInvalidType
Schema type '...' is not valid
SchemaMustBeModel
Schema
$ref: '...'
is recursively referenced and should be added as a model to the Stainless config.SecuritySchemeNotFound
Could not find security scheme: ...
UnsupportedResponseHeaderType
Unexpected non-primitive type:
...
for response header schema:...
UnsupportedStreamingParams
Streaming method uses a union type for request params which is not supported yet.
WebhookMethodInvalidArguments
A webhook verification custom method should have custom arguments, where one of the arguments is the 'body' and it throws an error on an incorrect signature.
GoDuplicateVariantNameForUnion
Duplicate variant names for SDKUnionSchema (undefined): undefined. You can resolve this by making union variants a named model.
GoNameNotAllowed
...
GoSnippetNotValid
snippet: ... stdout: ... stderr: ...
PythonDuplicateDeclaration
We generated two separated types under the same name:
...
. 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 withx-stainless-naming
PythonNameNotAllowed
...
PythonRequestParamShadowsDefault
Request param '...' would shadow a request option with the same name
JavaUnsupportedAliasModel
We currently do not support generating alias models in Java/Kotlin. You will have to remove it from the config.
Warnings
A warning indicates potential issues that could likely lead to unexpected behavior if not remediated. You should resolve all warnings prior to moving into a 1.0.0 release.
MethodUnexpectedPaginationState
...
MissingEndpoint
Endpoint
...
is present in the OpenAPI specification but isn't specified in Stainless config file. If you do not want to generate code for these endpoints, add them under the config keyunspecified_endpoints
instead.ModelDuplicateDefinition
Schema '...' has duplicate model names been given a model name '...'; One of the model definitions should be removed.
ModelSchemaTypeNotSupported
Model definition for ... are not supported yet in ...
ParamDuplicateName
Found parameter with duplicate parameter name
...
in...
. This should be explicitly renamed usingx-stainless-param
.ParameterMissingSchema
No schema for parameter is defined, assuming it's a schema of
type: string
PositionalParamNotFound
Got an unknown param in positional_params: '...'
ReadmeExampleNoNestedParams
Expected the given example params to include a nested object; The '...' endpoint has a nested parameter, '...'.
ReadmeExampleNotPaginated
Expected method '...' to be paginated
ReadmeExampleNotStreamed
Expected method '...' to be streamed
ReadmeMissingPagination
Pagination has been configured but there is no 'readme.example_requests.pagination' snippet defined
ReadmeMissingStreaming
Streaming has been configured but there is no 'readme.example_requests.streaming' snippet defined
SchemaInvalidEnumDescriptions
...
SchemaMissingType
Schema is missing a 'type' property
SchemaTypeUnionWithPropertiesDefinition
Schema defines
...
but also setstype: ...
with non-emptyproperties
. The schema should probably not haveproperties
.SecuritySchemeNotValid
Invalid security scheme '...': ...
UnsupportedMethodCustomBodySnippet
Custom method body snippets are not supported in ... yet
Note
A note describes a potential for misunderstanding between the current configuration and what the you intend to do. May cause a breaking change if fixed in the future, so it should be investigated before a 1.0.0 release.
DocsMissingParam
...
DocsUnknownProperty
...
MethodBodyParamShouldBeNamed
Encountered method with a non-object request body, defaulting to the name '...' for the generated method argument. To change this, set `body_param_name` in the method config, e.g. methods: my_method: type: http endpoint: post /examples body_param_name: 'items'
MethodNeedsRename
Consider renaming method ...
MethodParametersDefineAdditionalProperties
Request params schema defines
additionalProperties
but it will be ignoredModelNeedsRename
Consider renaming model ...; e.g. '...'
OASInvalidExample
Not a valid example: undefined, undefined
OASInvalidUnionExample
Could not find matching variant for the given example
...
SchemaAmbiguousEmptyObject
`type: object` definition is ambiguous, interpreting as `unknown`. If this should be a "mapping" schema, e.g. `...` in ..., then you should add `additionalProperties: true` to the schema. If you want this to be an empty object type instead then you can add `x-stainless-empty-object: true` to the schema.
SchemaInferredNameUsingRefName
Name generation falling back to using the $ref name, this can result in breaking changes in the future
SchemaInvalidArraySpec
...
SchemaIsAmbiguous
Ambiguous schema object does not have at least one of: type, oneOf, anyOf, or allOf. The most common solution is to edit the OpenAPI spec and add a missing
type
. If you meant for the schema to accept anything, addx-stainless-any
to suppress this message. Or you may want to use the replaceMatchingSchemas transform. Ambiguous schema object has been interpreted as: unknownSchemaUnknownFormat
Unknown schema format '...'
StreamingParamsFallback
No model name, $ref or 'streaming.param_type_name' defined - using default params type name
UnspecifiedEndpoint
Endpoint
...
is present under the config keyunspecified_endpoints
and code will not be generated for it.UnsupportedResponseType
Did not find a supported operation response content type; Received ...
UnsupportedTextSchema
Expected schema with
type: 'string'
for content type ...UnsupportedWebhookUnwrap
Webhook unwrap method tests are not currently supported for ...
GoMultipleFormatsInUnion
multiple different schema formats found for variants of ...: ...
GoSchemaVariantRequiresDiscriminator
Variant type 'object' for union requires a discriminator
GoSchemaVariantTypeNotSupported
Variant type '...' is not currently supported