JaxrsOpenApiContextBuilder adds deprecated = true to most OpenAPI operations

已查看 49 次
跳至第一个未读帖子

David Hoffer

未读,
2021年11月15日 17:14:552021/11/15
收件人 Quarkus Development mailing list

We are using swagger's JaxrsOpenApiContextBuilder (dependency below) to generate the OpenAPI docs in a Quarkus application.

<dependency> <groupId>io.swagger.core.v3</groupId> <artifactId>swagger-jaxrs2</artifactId> <version>2.1.11</version> </dependency>

However when Quarkus moved from version 2.3.0.Final to 2.3.1.Final it caused a transitive dependency change on hibernate-core (dependency below) from 5.6.0.Beta2 to 5.6.0.Final.

<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> </dependency>

Note later versions of Quarkus/Hibernate/Swagger do not fix this.

The change to 5.6.0.Final is what is causing Swagger to add the deprecated = true on almost all operations. What could be the cause of this? Is this a bug in hibernate or Swagger?  I'm hoping someone has some clues on this and can point me in the right direction.

-Dave

Phillip Krüger

未读,
2021年11月17日 04:09:592021/11/17
收件人 Quarkus Development mailing list
Hi Dave.
I do not know the answer to you question, but just out of interest, did you try and use smallrye-openapi extension to generate your OpenAPI ? Is there any reason you want to use swagger-jaxrs2 ?

David Hoffer

未读,
2021年11月18日 13:29:542021/11/18
收件人 Quarkus Development mailing list
Its just because of a legacy implementation that came from Thorntail days.  If we were to start over we would look at the smallrye-openapi extension.  One question I have on that, how can I access the final OpenAPI structure that it generates and modify it?  We have some requirements that might not be included in the implementation, such as ordering schemas alphabetically and other modifictions.

-Dave

Phillip Kruger

未读,
2021年11月19日 01:35:562021/11/19
收件人 dhof...@gmail.com、Quarkus Development mailing list
That should be possible if you use smallrye-openapi. There are a few options to do that.


You can supply your own (subset) of the schema that will be merged into the final one. (see https://quarkus.io/guides/openapi-swaggerui#loading-openapi-schema-from-static-files)

There might also be a configuration that already enable what you want to do (see https://quarkus.io/guides/openapi-swaggerui#configuration-reference)

There are a lot of benefits to moving to smallrye-openapi, for example auto security, auto tagging and customized swagger-ui.

At some point we are planning to add support for swagger annotation (see https://github.com/smallrye/smallrye-open-api/issues/752) but it's not being worked on at the moment

Cheers

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/6a4fa248-1322-47b0-9205-181f5256a520n%40googlegroups.com.

David Hoffer

未读,
2021年11月30日 10:54:272021/11/30
收件人 Quarkus Development mailing list
Sounds good.  At some point I would like to try switching to use smallrye-openapi.
回复全部
回复作者
转发
0 个新帖子