enum and properties change in schemas not reported in .md file generated after diff check
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 42/100
Direção de pesquisa
Reproduza o problema com as especificações JSON do OpenAPI antiga e nova fornecidas e compare o diff de Markdown gerado. Rastreie o caminho do diff e do reporting em Markdown para os esquemas de componentes reutilizados e as propriedades aninhadas. O trabalho estará concluído quando toda alteração aplicável de enum e de propriedade aparecer no relatório para cada chamada REST afetada.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Compared 2 API Specifications json. The Specification contains multiple component schemas. But if there is an Enum Array (same array) is present in different component schemas, then while publishing the diff for Rest Call only once the ENUM change is reported although multiple schema changes are applicable for that or other Rest Call with the same Enum Array list.
Similarly observed the same issue with properties change in Schema.
Sample for enum issue:
Old Spec:
{ "openapi": "3.0.1", "paths": { "/check/api/Id/Exp{ExpId}": { "get": { "responses": { "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExpRO" } } } } } } } }, "components": { "schemas": { "ExpRO": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ExpDataRO" } } }, "ExpDataRO": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "tpeExpectations" ] }, "attributes": { "$ref": "#/components/schemas/ExpAttributesRO" } } }, "ExpAttributesRO": { "type": "object", "properties": { "Terminations": { "type": "array", "items": { "$ref": "#/components/schemas/TerminationRO" } } } }, "TerminationRO": { "type": "object", "properties": { "nniNetwork": { "$ref": "#/components/schemas/NetworkRO" }, "ponConnection": { "$ref": "#/components/schemas/PonConnectionRO" } } }, "NetworkRO": { "type": "object", "properties": { "tagAction": { "type": "string", "enum": [ "none", "pop", "push", "stamp" ] }, "floodingLink": { "type": "string", "enum": [ "enabled", "disabled" ] } } }, "PonConnectionRO": { "type": "object", "properties": { "tagAction": { "type": "string", "enum": [ "none", "pop", "push", "stamp" ] } } } } } }
New Spec:
{ "openapi": "3.0.1", "paths": { "/check/api/Id/Exp{ExpId}": { "get": { "responses": { "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExpRO" } } } } } } } }, "components": { "schemas": { "ExpRO": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ExpDataRO" } } }, "ExpDataRO": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "tpeExpectations" ] }, "attributes": { "$ref": "#/components/schemas/ExpAttributesRO" } } }, "ExpAttributesRO": { "type": "object", "properties": { "Terminations": { "type": "array", "items": { "$ref": "#/components/schemas/TerminationRO" } } } }, "TerminationRO": { "type": "object", "properties": { "NetworkConnectionPackage": { "$ref": "#/components/schemas/NetworkConnectionRO" }, "ponConnectionPackage": { "$ref": "#/components/schemas/PonConnectionRO" }, "datalinkPackage": { "$ref": "#/components/schemas/DatalinkRO" } } }, "NetworkConnectionRO": { "type": "object", "properties": { "tagAction": { "type": "string", "enum": [ "none", "pop", "push", "stamp" ] }, "floodingLink": { "type": "string", "enum": [ "enabled", "disabled" ] } } }, "PonConnectionRO": { "type": "object", "properties": { "tagAction": { "type": "string", "enum": [ "none", "pop", "push", "stamp" ] } } }, "DatalinkRO": { "type": "object", "properties": { "adminState": { "type": "string", "enum": [ "enabled", "disabled" ] } } } } } }
Diff md file:
What's Changed
GET /check/api/Id/Exp{ExpId}
Return Type:
Changed response : **default **
-
Changed content type :
application/json-
Changed property
data(object)-
Changed property
attributes(object)-
Changed property
Terminations(array)Changed items (object):
-
Added property
NetworkConnectionPackage(object)-
Property
tagAction(string)Enum values:
nonepoppushstamp
-
Property
floodingLink(string)Enum values:
enableddisabled
-
-
Added property
ponConnectionPackage(object)- Property
tagAction(string)
- Property
-
Added property
datalinkPackage(object)- Property
adminState(string)
- Property
-
Deleted property
nniNetwork(object) -
Deleted property
ponConnection(object)
-
-
-
-
Enum change not reported for datalinkPackage -> adminState and ponConnectionPackage -> tagAction
Sample for properties issue:
Old Spec:
{ "openapi": "3.0.1", "paths": { "/check/API": { "get": { "responses": { "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExpAPIRO" } } } } } } } }, "components": { "schemas": { "ExpAPIRO": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ExpAPIDataRO" } } }, "ExpAPIDataRO": { "type": "object", "properties": { "relationships": { "$ref": "#/components/schemas/ExpAPIRelationshipsRO" } } }, "ExpAPIRelationshipsRO": { "type": "object", "properties": {} } } } }
New Spec:
{ "openapi": "3.0.1", "paths": { "/check/API": { "get": { "responses": { "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExpAPIRO" } } } } } } } }, "components": { "schemas": { "ExpAPIRO": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ExpAPIDataRO" } } }, "ExpAPIDataRO": { "type": "object", "properties": { "relationships": { "$ref": "#/components/schemas/ExpAPIRelationshipsRO" } } }, "ExpAPIRelationshipsRO": { "type": "object", "properties": { "linkedTpes": { "$ref": "#/components/schemas/OneToManyRelationshipRO" }, "shelfNetworkConstruct": { "$ref": "#/components/schemas/OneToOneRelationshipRO" } } }, "OneToManyRelationshipRO": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/RelationshipDataRO" } }, "meta": { "$ref": "#/components/schemas/RelationshipMetaDataRO" } } }, "RelationshipDataRO": { "type": "object", "properties": { "type": { "type": "string" }, "id": { "type": "string" }, "attributes": { "$ref": "#/components/schemas/RelationshipAttributesRO" } } }, "RelationshipAttributesRO": { "type": "object", "properties": { "additionalAttributes": { "$ref": "#/components/schemas/AdditionalAttributesRO" } } }, "AdditionalAttributesRO": { "type": "object" }, "RelationshipMetaDataRO": { "type": "object", "properties": { "partiallyPopulated": { "type": "boolean" } } }, "OneToOneRelationshipRO": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/RelationshipDataRO" }, "meta": { "$ref": "#/components/schemas/RelationshipMetaDataRO" } } } } } }
Diff md file:
What's Changed
GET /check/API
Return Type:
Changed response : **default **
-
Changed content type :
application/json-
Changed property
data(object)-
Changed property
relationships(object)-
Added property
linkedTpes(object)-
Property
data(array)Items (object):
-
Property
type(string) -
Property
id(string) -
Property
attributes(object)- Property
additionalAttributes(object)
- Property
-
-
Property
meta(object)- Property
partiallyPopulated(boolean)
- Property
-
-
Added property
shelfNetworkConstruct(object)-
Property
data(object) -
Property
meta(object)
-
-
-
-
Property change in shelfNetworkConstruct-> meta and shelfNetworkConstruct-> data not reported in MD file.
- Linguagem predominante
- Java
- Estrelas
- 1.1k
- Forks
- 190
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de OpenAPITools/openapi-diff
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
OpenAPITools/openapi-diff#506 ·
-
good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
OpenAPITools/openapi-diff#364 ·
-
bug OpenAP 3.1.0 Support
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
OpenAPITools/openapi-diff#910 · 1 comentário ·
-
Render capabilities
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
OpenAPITools/openapi-diff#893 · 1 comentário ·
-
Breaking/Non-Breaking classification
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
OpenAPITools/openapi-diff#886 ·
Todas as issues de OpenAPITools/openapi-diff
Issues semelhantes
-
certification
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 80/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Abertabug ecr
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Needs: Triage Type: Feature request
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
github/copilot-sdk#2760 ·