You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Exception in thread "main" java.lang.RuntimeException: Could not process model 'list_accessor_sparse_indices_4XX_response_allOf_errors_inner_source'.Please make sure that your schema is correct!
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:518)
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:443)
at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:1293)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:535)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Caused by: java.lang.NullPointerException: Cannot invoke "String.replaceAll(String, String)" because "name" is null
at org.openapitools.codegen.languages.AbstractRustCodegen.sanitizeIdentifier(AbstractRustCodegen.java:187)
at org.openapitools.codegen.languages.AbstractRustCodegen.toModelName(AbstractRustCodegen.java:349)
at org.openapitools.codegen.languages.RustClientCodegen.fromModel(RustClientCodegen.java:295)
at org.openapitools.codegen.DefaultGenerator.processModels(DefaultGenerator.java:1755)
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:513)
... 5 more
openapi-generator version
7.13.0
OpenAPI declaration file content or url
{
"openapi": "3.1.0",
"paths": {
"/api/accessor-sparse-indices/": {
"get": {
"tags": [
"Accessor Sparse Indices"
],
"operationId": "list_accessor_sparse_indices",
"parameters": [
{
"name": "fields[accessor-sparse-indices]",
"in": "query",
"description": "Specifies which fields should be returned. The value **MUST** be a comma-separated\n(U+002C COMMA, “,”) list that refers to the name(s) of the fields to be returned.\n\nAn empty value indicates that no fields should be returned.\n\nOmitting this parameter indicates that all fields should be returned.",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"bufferView",
"byteOffset",
"componentType"
]
}
},
"explode": false
},
{
"name": "include",
"in": "query",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"bufferView"
]
}
},
"explode": false
},
{
"name": "page[number]",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int64",
"default": 1
},
"allowReserved": true,
"example": 1
},
{
"name": "page[size]",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int64",
"default": 100
},
"allowReserved": true,
"example": 100
}
],
"responses": {
"4XX": {
"description": "Client error response.",
"content": {
"application/vnd.api+json": {
"schema": {
"allOf": [
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"status",
"title",
"detail"
],
"properties": {
"status": {
"type": "string",
"example": "404"
},
"title": {
"type": "string",
"example": "Not found"
},
"detail": {
"type": "string",
"example": "The requested resource cannot be found."
},
"source": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/Source"
}
]
}
}
}
}
}
}
]
},
"example": "\n{\n\"errors\": [\n {\n\"status\": \"404\",\n\"title\": \"Resource not found\",\n\"detail\": \"The requested resource could not be found.\"\n }\n ]\n}\n"
}
}
},
JMLX42
changed the title
[BUG] Description
[BUG] [Rust] SIMPLIFY_ONEOF_ANYOF=false causes NullPointerException: ... "name" is null in AbstractRustCodegen.sanitizeIdentifier
Apr 30, 2025
Bug Report Checklist
Description
openapi-generator version
7.13.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
The text was updated successfully, but these errors were encountered: