Java Micronaut codegen: how to incorporate OpenAPI v3.x relative URLs for endpoint path generation?
还没有人认领这个 Issue。
评估
调研方向
首先阅读所引用的 MicronautCodegen.java 实现和 Java mustache templates,以追踪端点路径是如何组装的。使用包含 servers.url 或 basePath 的示例 OpenAPI 规范作为复现用例,然后验证生成的端点在 /users 之前包含 /v1。
由索引模型根据 Issue 内容生成。
描述
Consider an OpenAPI yaml spec file with this definition:
openapi: "3.0.2"
info:
title: Some title
description: Some description
version: 0.0.1
contact:
name: Some name
url: http://www.example.com
email: [email protected]
servers:
- url: /v1/
paths:
/users:
get:
operationId: getUsers
I've also tried setting basePath instead:
openapi: "3.0.2"
info:
title: Some title
description: Some description
version: 0.0.1
contact:
name: Some name
url: http://www.example.com
email: [email protected]
servers:
- url: http://localhost:8080
basePath: /v1
paths:
/users:
get:
operationId: getUsers
I would have expected that the endpoint path generated is /v1/users, but instead it's just /users.
Is there a way to incorporate this path into my endpoints? Either by subclassing MicronautCodegen, or maybe by editing my mustache templates?
- 主要语言
- Mustache
- 星标
- 299
- 派生
- 439
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
swagger-api/swagger-codegen-generators 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
[Bug]: Python/pythonFlaskConnexion generators validate map keys instead of values for additionalProperties.enum可能已有人在做 @pvillard31 于 208 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
[Bug]: Bean validation doesn't work for numbers larger than Integer.MAX_VALUE可能已有人在做 @apupier 于 296 天前认领。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 68/100
swagger-api/swagger-codegen-generators#1370 · 3 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 64/100
查看 swagger-api/swagger-codegen-generators 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
ROCm/rocm-libraries#15665 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
shadps4-emu/shadPS4#5705 ·
维护者通常 1 天内回复
-
bug multiple issues priority: high
难度 2/5 1-3 小时 新手友好度 78/100
storytold/gridcraft#3928 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
Qiskit/qiskit-aer#2533 ·
维护者通常 1 天内回复