- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 生成一些 Web 服务定义Swagger Codegen » 2.2.1
所有配置都在工作,我的 .yaml
正确生成了类定义。
Why the property
basePath
is being ignored?
@RestController
仅使用
paths
生成定义:
https://springboot-base-save-return.appdes.xnet/saveBackendReturn
预期(使用
basePath
和
paths
定义):
https://springboot-base-save-return.appdes.xnet/v1/saveBackendReturn
我究竟做错了什么?我忘记了什么吗?
.yaml
契约(Contract):
swagger: '2.0'
info:
description: My Project
version: 1.0.0
title: Save Backend Return
host: springboot-base-save-return.appdes.xnet
basePath: /v1
tags:
- name: saveBackendReturn
description: Save Backend Return
schemes:
- https
paths:
/saveBackendReturn:
post:
tags:
- saveBackendReturn
summary: Save Backend Return
description: My Project
operationId: saveBackendReturn
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
description: My Project
required: true
schema:
$ref: '#/definitions/saveBackendReturnRequest'
responses:
'200':
description: Ok
schema:
$ref: '#/definitions/saveBackendReturnResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/Error'
security:
- basicAuth: []
最佳答案
搜索更多相关信息,我找到了 issue .
这是由 HugoMario 修复的错误( commit 引用于 2019 年 12 月 2 日)
Summary:» It's a bug of an outdated version» Now works fine!
swagger-codegen-maven-plugin
:
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.4.12</version>
</dependency>
Maven 中央存储库 (检查新版本):
F5
)并创建一个
清洁构建 :
mvn clean verify
mvn install
关于spring - Swagger Codegen basePath 被忽略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59918115/
我需要一种方法来注释我的 openapi 3 规范,以便 swagger-codegen 将注释添加到我的 java 类中,例如 @JsonIgnoreProperties(ignoreUnknown
我升级到 swagger-codegen 3.0.10,屏幕上突然出现大量调试输出。似乎没有关闭它的命令行选项。 有谁知道如何关闭调试输出? 最佳答案 想通了。 Swagger-codegen 使用
我正在尝试使用 https://github.com/swagger-api/swagger-codegen 生成 nodejs 客户端 sdk这是我使用的命令 swagger-codegen gen
I would like to ask if there is a Swagger tool that can generate clients according to the latest
在我的 package.json 文件中,我有运行 graphql-codegen 的脚本条目,但它提示 --config 参数无效: $> yarn gen yarn run v1.21.1 $ g
我有一个.Net Core v2.1 Web API,它使用NSwag生成其Swagger Json。 我有一个这样的响应模型- public class LoginResponse { pu
我正在使用 slick 2.x's codegen从数据库模式生成 Scala 模型的功能。但是,是否可以遍历外键约束以生成相关模型,例如如果我有这个架构 CREATE TABLE people(id
我如何才能获得敏捷的代码生成器,以使用现有的类而不是创建新的类?这可能吗?例如,我想使用org.springframework.data.domain.Page而不是大张旗鼓地创建另一个页面类。 最佳
我正在寻找进入 Swagger,更具体地说,swagger-codegen 工具。我在 github 和 http://swagger.io/ 中都找到了提供的信息、文档和规范。相当困惑(另外,一些指
我正在使用 swagger codegen maven 插件从 swagger 规范生成服务器 stub 。如果我运行 mvn compile然后它正确生成并编译项目。但是,有时我只想运行生成。 具体
我正在尝试从包含的 yaml 生成客户端 acceptParam: name: Accept type: string required: true in: hea
我遇到了 apollo-codegen 未成功生成 typescript 代码的情况。 对于 graphql 文件( generated/schema.graphql ): type Author {
我已经为特定 API 生成了带有 swagger codegen 的客户端应用程序,javascript版本。用 npm 等初始化它。一切都拍手。 然而,当我尝试使用生成的 api 从我的本地主机向
我已经生成了一个 swagger 客户端 api: java -jar swagger-codegen-2.2.3/modules/swagger-codegen-cli/target/swagger
我在 Postgres 中有一个如下所示的设置: CREATE TYPE my_enum AS ENUM ( 'left', 'right'); CREATE TABLE my_table ( dir
我正在尝试使用 codegen 将以下 Matlab 代码转换为 C++。但是它在构建时失败了,我得到了错误: "??? Unless 'rows' is specified, the first i
我目前正在尝试建立一个 Maven 项目,该项目根据一些 WSDL 文件生成一些 Java 代码。 不幸的是,我遇到了一些问题,因为我的测试环境没有有效的 SSL 证书(我已使用 chrome 确认了
我正在使用 swagger/swagger-codegen 实现我的第二个 API。在有了第一个良好的开端之后,我有点陷入以下问题:我有多个定义,如下所示: TopIssueReference:
我需要根据提供的 swagger 文件生成类。不幸的是我对此文件的内容没有影响。 我在 Gladle 中的配置如下所示: task generateApi { doLast { def con
我想从 xml 文件创建 java 类。我用的是JIBX。我试试这个: java -cp C:\Documents and Settings\kliver\Мои документы\Загрузки
我是一名优秀的程序员,十分优秀!