Add support for OpenAPI spec 3.2
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- java, openapi, spring-boot
Piste de recherche
Start by reading how springdoc generates api-docs and handles OpenAPI specification versions, then compare its current 3.1 support with the requested 3.2 behavior. Done means springdoc can generate api-docs using version 3.2.x and represent the XML element with attributes and text content as described.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Is your feature request related to a problem? Please describe.
My problem is that I want to describe an XML schema and generate examples that have an element with attributes and a text-type child element:
<request>
<signature version="2.0">123abc</signature>
</request>
The result when translating the DAO with JAXB
@Schema
@XmlRootElement(name = "request")
public class Request {
@XmlElement(name = "signature")
public Signature signature;
public class Signature {
@Schema(example = "2.0")
@XmlElement(name = "version")
public String version;
@Schema(example = "123abc")
@XmlValue
public String value;
}
but rendering it with springdoc 2.8.17 and OpenAPI 3.1 gives me the api-docs:
<request>
<signature version="2.0">
<value>123abc</value>
</signature>
</request>
Describe the solution you'd like
The lack of support for this stems from OpenAPI not supporting this as of spec 3.1. There was an issue filed for OpenAPI-Specification https://github.com/OAI/OpenAPI-Specification/issues/630. It was implemented in https://github.com/OAI/OpenAPI-Specification/pull/4592 and released in https://github.com/OAI/OpenAPI-Specification/releases/tag/3.2.0.
So I'd like springdoc to add support for api-docs version 3.2.x.
Describe alternatives you've considered
My alternative for now is to hard-code the example into my api-docs and accept the wrong looking schema until newer OpenAPI spec versions.
- Langage dominant
- Java
- Étoiles
- 3.7k
- Forks
- 605
- Merge moyen
- 4 j 18 h
- PR mergées (30 j)
- 21
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de springdoc/springdoc-openapi
-
enhancement upstream
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
springdoc/springdoc-openapi#3309 · 4 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de springdoc/springdoc-openapi
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
googleads/googleads-mobile-flutter#1541 ·
Les mainteneurs répondent en général sous 4 jours
-
Keyboard crashes Chrome tabsOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
Julow/Unexpected-Keyboard#1490 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
Vakore/ZappierGames#275 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
unitycatalog/unitycatalog#2148 ·
Les mainteneurs répondent en général sous 2 jours
-
enhancement priority: low
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
Riptide-Labs/riptide#1060 ·
Les mainteneurs répondent en général sous 1 jour