array return types get assigned names that contain special characters, breaking tooling
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- java, openapi, spring, spring-boot
研究方向
Start by tracing how springdoc derives OpenAPI schema component names for the shown ResponseEntity<ResponseEnvelope<Foo[]>> return type, then check the related schema naming tests. Reproduce the generated ResponseEnvelopeFoo[] name and determine whether the issue calls for changing that name or adding the suggested configuration and warning. Done means the chosen behavior is covered by a regression test; the issue does not name a file or test.
由索引模型根據 Issue 內容生成。
描述
this code:
// Foo[] is BAD and breaks our action!
@GetMapping
public ResponseEntity<ResponseEnvelope<Foo[]>> getFoos() {
...
}
gets parsed into this:
"ResponseEnvelopeFoo[]": {
"type": "object",
"properties": {
"status": { "type": "string", "enum": ["OK", "ERROR"] },
"httpCode": { "type": "integer", "format": "int32" },
"data": {
"type": "array",
"items": { "$ref": "#/components/schemas/Foo" }
},
"error": { "$ref": "#/components/schemas/ErrorDetails" }
}
}
which is of course valid json and allowed by the openapi spec, but it did break my tooling and it took me a good hour to figure out what happened.
if you don't consider this a bug and don't want to break backwards compatibility for this i understand, maybe add a configuration option <entityNamesMayContainSpecialCharacters>false</entityNamesMayContainSpecialCharacters> and add a console warning if an entity like this is generated? cheers
- 主要語言
- Java
- 星號
- 3.7k
- 分支
- 605
- 平均合併
- 2 天 11 小時
- 30 天內合併 PR
- 17
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
springdoc/springdoc-openapi 的其他 Issue
-
Spring Data REST: non-exported association schemas renamed to <Name>Response since 3.1.1 (breaking), applied inconsistently可能已有人在做 @wn1331 今天認領。 未關閉
難度 4/5 3-5 天 新手友好度 30/100
springdoc/springdoc-openapi#3429 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
MCP: OpenApiSchemaConverter drops types from OpenAPI 3.1 type arrays可能已有人在做 @mariodavid 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 30/100
springdoc/springdoc-openapi#3427 ·
維護者通常 1 天內回覆
-
enhancement upstream
難度 4/5 3-5 天 新手友好度 48/100
springdoc/springdoc-openapi#3324 · 2 則留言 ·
維護者通常 1 天內回覆
-
enhancement upstream
難度 3/5 1-2 天 新手友好度 55/100
springdoc/springdoc-openapi#3309 · 4 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
查看 springdoc/springdoc-openapi 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
vert-x3/vertx-mail-client#268 ·
-
desktop edt not responding
難度 1/5 1-3 小時 新手友好度 86/100
-
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆
-
physical
難度 2/5 1-3 小時 新手友好度 74/100
antonyrag/ragleap-core#1339 ·
-
難度 2/5 1-3 小時 新手友好度 83/100
apache/doris-kafka-connector#110 ·