openapi - OpenApi Smallrye:使用 application.properties 文件配置服务器
问题描述
我在 Quarkus 应用程序中有以下 API 定义:
@OpenAPIDefinition(
servers = {
@Server(url = "/")
},
info = @Info(
description = "Description of my interface",
title = "Title of my interface",
version = ".",
contact = @Contact(
name = "Some name",
email = "some email")
))
public class MyApplicationextends Application {}
我现在想将服务器定义移到我的application.properties
(因为我有一个特定的服务器路径,具体取决于环境)。我能够覆盖info.version
using mp.openapi.extensions.smallrye.info.version=1.26.0
。但是我找不到如何覆盖服务器。我尝试过,但生成的文件mp.openapi.extensions.smallrye.servers=https://dummy2
中没有显示任何内容。openapi.yaml
如果这可能?
解决方案
推荐阅读
- assembly - MASM 在输入负小数时给出不正确的结果
- javascript - OpenCV JS 中的图像类型在哪里?
- python - 目录中的所有文件未在 python 中显示
- vb.net - VB.NET 如何结束所有 Subs
- python - 从第一个检测词的字符串中检测子字符串
- python-3.x - 如何将对象添加到列表并使用 Class 打印对象?
- rust - Rust:寻找 C memcpy 等价物
- mysql - mysql按最大值选择分组并获取唯一行
- sql-server - 将 Azure Devops 中所有 sprint 的开始和结束日期列表获取到我的数据库中?
- reactjs - React 路由器 - 将 api 数据传递给链接的组件以使用新页面打开