admin管理员组文章数量:1394544
I am working with OpenAPI version 7.0.1 and I have some behavior I don't understand.
When I try to map the type of my schema multi value map to Spring multi value map it does not work, I guess because OpenAPI map my multi value map to Java map.
I used schema mapping and I was able to get the result I wanted, the problem is that when I try to tell OpenAPI to import the multi value map it does not recognize my import mapping.
I did import mapping to another object and it worked as expected, I guess it was because in the previous object I used type mapping instead of schema mapping.
This is my pom.xml
, as you can see I tried diffrent ways to use multi value map:
<typeMappings>
<typeMapping>string+binary=ResponseBodyEmitter</typeMapping>
<typeMapping>object+array=MultiValueMap</typeMapping>
<typeMapping>#/components/schemas/MultiValueMapStringString=MultiValueMap</typeMapping>
</typeMappings>
<schemaMappings>
<schemaMapping>MultiValueMapStringString=.springframework.util.MultiValueMap</schemaMapping>
</schemaMappings>
<importMappings>
<importMapping>ResponseBodyEmitter=.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter</importMapping>
<importMapping>MultiValueMap=.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter</importMapping>
</importMappings>
This is my multi value map schema:
MultiValueMapStringString:
type: object
additionalProperties:
type: array
items:
type: string
Does anyone know how OpenAPI work with the import mapping?
本文标签: javaOpenAPI does not recognize my import mapping in Spring BootStack Overflow
版权声明:本文标题:java - OpenAPI does not recognize my import mapping in Spring Boot - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744098459a2590715.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论