Astro企业应用 AstroPro-swagger标签使用指南:21、x-pom-gav
21、x-pom-gav
作用
自定义标签-pom坐标引入。
标签值类型
List
使用位置
x-pom-gav
components.schemas.model.x-pom-gav
components.schemas.model.properties.property.x-pom-gav
paths.path.operation.x-pom-gav
paths.path.operation.parameters.name.x-pom-gav

x-pom-gav在Swagger文件中的位置可以是类级别、方法级别、参数级别,groupId、artifactId、version按照顺序用:连接,全局有一个地方定义即可,不需要重复定义。
使用示例
swagger: "2.0"info: description: "" version: "v1" title: "testSwagger" termsOfService: "http://www.coarl.org/service.html"host: "git.huawei.com"basePath: "/testswagger"x-entity-package: "customdto"x-interface-name-style: SERVICE_IMPL_AND_NO_I_INTERFACE_PREFIXx-user-defined-consumes: truex-pom-gav: # 手动引入hibernate-validator:依赖 - "org.hibernate.validator:hibernate-validator:8.0.1.Final"-------
使用效果:
使用前:
pom中没有org.hibernate.validator:hibernate-validator:8.0.1.Final的依赖
使用后:
pom中生成org.hibernate.validator:hibernate-validator:8.0.1.Final的依赖