[2.1.0-beta.6 and oas-3.1.0] Request body property data type change is detected as compatible or no_change
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 38/100
Rechercherichtung
Beginne damit, den Bericht mit old.yml und new.yml unter Verwendung des angegebenen openapi-diff-Docker-Befehls zu reproduzieren und die Ergebnisse von OpenAPI 3.1.0 mit dem Verhalten von 3.0.3 zu vergleichen. Verfolge den Vergleich des Typs des Request-Body-Schemas und füge Regressionstests für Änderungen von string/object und string/integer hinzu; abgeschlossen ist die Aufgabe, wenn diese Änderungen als inkompatibel gemeldet werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
- string to object (actual: compatible, expected: incompatible)
- string to integer/integer to string (actual: no_change, expected: incompatible)
Case 1:
old.yml
openapi: 3.1.0
info:
title: Demo API
version: v1
paths:
/endpoint:
post:
requestBody:
content:
application/json:
schema:
type: object
required:
- requiredProp
- requiredToRemoveProp
- dataTypeChangedRequiredProp
- requiredToOptionalProp
properties:
requiredProp:
type: string
optionalProp:
type: string
optionalToRemoveProp:
type: string
requiredToRemoveProp:
type: string
dataTypeChangedRequiredProp:
type: string
dataTypeChangedOptionalProp:
type: string
optionalToRequiredProp:
type: string
requiredToOptionalProp:
type: string
responses:
default:
description: successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: integer
format: int64
example: 201
new.yml
openapi: 3.1.0
info:
title: Demo API
version: v1
paths:
/endpoint:
post:
requestBody:
content:
application/json:
schema:
type: object
required:
- requiredProp
- requiredToRemoveProp
- dataTypeChangedRequiredProp
- requiredToOptionalProp
properties:
requiredProp:
type: string
optionalProp:
type: string
optionalToRemoveProp:
type: string
requiredToRemoveProp:
type: string
dataTypeChangedRequiredProp:
type: object
properties:
id:
type: string
dataTypeChangedOptionalProp:
type: string
optionalToRequiredProp:
type: string
requiredToOptionalProp:
type: string
responses:
default:
description: successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: integer
format: int64
example: 201
Case 2:
old.yml
openapi: 3.1.0
info:
title: Demo API
version: v1
paths:
/endpoint:
post:
requestBody:
content:
application/json:
schema:
type: object
required:
- requiredProp
- requiredToRemoveProp
- dataTypeChangedRequiredProp
- requiredToOptionalProp
properties:
requiredProp:
type: string
optionalProp:
type: string
optionalToRemoveProp:
type: string
requiredToRemoveProp:
type: string
dataTypeChangedRequiredProp:
type: integer
dataTypeChangedOptionalProp:
type: string
optionalToRequiredProp:
type: string
requiredToOptionalProp:
type: string
responses:
default:
description: successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: integer
format: int64
example: 201
new.yml
openapi: 3.1.0
info:
title: Demo API
version: v1
paths:
/endpoint:
post:
requestBody:
content:
application/json:
schema:
type: object
required:
- requiredProp
- requiredToRemoveProp
- dataTypeChangedRequiredProp
- requiredToOptionalProp
properties:
requiredProp:
type: string
optionalProp:
type: string
optionalToRemoveProp:
type: string
requiredToRemoveProp:
type: string
dataTypeChangedRequiredProp:
type: string
dataTypeChangedOptionalProp:
type: string
optionalToRequiredProp:
type: string
requiredToOptionalProp:
type: string
responses:
default:
description: successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: integer
format: int64
example: 201
Examples are having data-type change only for required property but tested the same for optional property giving same output
Command used: docker run --rm -t -v $(pwd):/specs openapitools/openapi-diff:2.1.0-beta.6 /specs/old.yml /specs/new.yml --state
EDIT: The same changes are considered as incompatible with openapi: 3.0.3 and below
- Vorherrschende Sprache
- Java
- Sterne
- 1.1k
- Forks
- 190
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus OpenAPITools/openapi-diff
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
OpenAPITools/openapi-diff#506 ·
-
good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
OpenAPITools/openapi-diff#364 ·
-
bug OpenAP 3.1.0 Support
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
OpenAPITools/openapi-diff#910 · 1 Kommentar ·
-
Render capabilities
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
OpenAPITools/openapi-diff#893 · 1 Kommentar ·
-
Breaking/Non-Breaking classification
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
OpenAPITools/openapi-diff#886 ·
Alle Issues in OpenAPITools/openapi-diff
Ähnliche Issues
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
apache/flink-agents#1152 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
objectionary/eo-graphs#75 ·