ChangedSchema in a readOnly property for requestBody is not filtered out from the result.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- java
- Ambito
- api, backend-api-design
Direzione di ricerca
Inizia riproducendo il problema con gli esempi Old API e New API, concentrandoti sui risultati di ChangedSchema e ChangedOpenApi per la proprietà bar readOnly nel corpo della richiesta. Traccia il modo in cui lo schema Bar modificato viene filtrato dai controlli di compatibilità del corpo della richiesta, ma rimane in ChangedSchema; il lavoro è completato quando l'elenco delle modifiche risultante e l'output di compatibilità non riportano più quella modifica filtrata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Old API
{
"openapi":"3.0.0",
"info":{
"title":"API",
"version":"0.1.0"
},
"paths":{
"/resource":{
"post":{
"responses":{
"200":{
"description":"Created resource",
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/CreateResourceResponse"
}
}
}
}
},
"summary":"Create resource",
"requestBody":{
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/CreateResourceRequest"
}
}
},
"description":"Definition of the resource"
}
}
}
},
"components": {
"schemas": {
"CreateResourceResponse": {
"type": "object",
"properties": {
"resources": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"CreateResourceRequest": {
"type": "object",
"properties": {
"foo": {
"$ref": "#/components/schemas/Foo"
}
}
},
"Foo": {
"type": "object",
"properties": {
"bar": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Bar"
},
"readOnly": true
}
}
},
"Bar": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
}
}
}
New API
{
"openapi":"3.0.0",
"info":{
"title":"API",
"version":"0.1.0"
},
"paths":{
"/resource":{
"post":{
"responses":{
"200":{
"description":"Created resource",
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/CreateResourceResponse"
}
}
}
}
},
"summary":"Create resource",
"requestBody":{
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/CreateResourceRequest"
}
}
},
"description":"Definition of the resource"
}
}
}
},
"components": {
"schemas": {
"CreateResourceResponse": {
"type": "object",
"properties": {
"resources": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"CreateResourceRequest": {
"type": "object",
"properties": {
"foo": {
"$ref": "#/components/schemas/Foo"
}
}
},
"Foo": {
"type": "object",
"properties": {
"bar": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Bar"
},
"readOnly": true
}
}
},
"Bar": {
"type": "object",
"properties": {
"name": {
"type": "integer"
}
}
}
}
}
}
In this example, the property bar in Foo schema is a readOnly property and Foo is referenced by request body of the endpoint.
When Bar schema is changed, it's filtered out from the request body but the change exists in the list of ChangedSchema in ChangedOpenApi, which results incompatible changes but shows nothing.
==========================================================================
== API CHANGE LOG ==
==========================================================================
API
--------------------------------------------------------------------------
-- Result --
--------------------------------------------------------------------------
API changes broke backward compatibility
--------------------------------------------------------------------------
- Lingua principale
- Java
- Stelle
- 1.1k
- Fork
- 190
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenAPITools/openapi-diff
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenAPITools/openapi-diff#506 ·
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenAPITools/openapi-diff#364 ·
-
bug OpenAP 3.1.0 Support
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
OpenAPITools/openapi-diff#910 · 1 commento ·
-
Render capabilities
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
OpenAPITools/openapi-diff#893 · 1 commento ·
-
Breaking/Non-Breaking classification
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
OpenAPITools/openapi-diff#886 ·
Tutte le issue di OpenAPITools/openapi-diff
Issue simili
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/flink-agents#1152 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
objectionary/eo-graphs#75 ·