知识卡片
标签驱动生成布局
给业务操作选稳定标签,既便于查文档也可整理生成文件。不同生成模板解释标签的方式可能不同,升级前检查分组及生成差异。标签重排可能改变生成代码归属。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Building a backend with Node.js and Swagger Codegen 13.4 Updating OpenAPI for the backend · 查看原书依据
Codegen uses tags to create controllers and services. Each API operation has one designated controller file that contains the function with its implementation, so the router knows which function to call for a certain route and method. Unlike documentation, it makes no
参考来源
- 位置:《Designing APIs with Swagger and OpenAPI》第13章《Building a backend with Node.js and Swagger Codegen》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch13.htm,阅读块 83)
- 结论依据:书中工具按首标签分配控制器,文档则可按多标签呈现。
- 原始内容:Codegen uses tags to create controllers and services. Each API operation has one designated controller file that contains the function with its implementation, so the router knows which function to call for a certain route and method. Unlike documentation, it makes no