sort - order not always preserved on certain sub-objects
@thim81 ci sta già lavorando.
Dal 9/7/2023.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
My goal is to create normalised openapi.json files which developers can confidently review in a PR before deploying to apigee. This tool seems promising in helping us achieve that.
Unfortunately I'm experiencing unexpected sort side-effects which run contrary to the described behaviour:
The fields that are not specified will keep their order like it is in the original OpenAPI document, so only defined fields will be re-ordered.
Just using the default sorting, sub-properties eg auditStatus seem to have a reverse-alpha sort applied. Is there a way to configure that (other than essentially declaring the entire schema ordering in the config file, right down to the leaf level)?
Input:
"schema": {
"items": {
"properties": {
"auditStatus": {
"readOnly": true,
"type": "string"
},
"columnType": {
"type": "string"
},
"createdBy": {
"readOnly": true,
"type": "string"
},
"createdDate": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"customValidationType": {
"type": "string"
},
"dataContractColumnValidations": {
"items": {
"properties": {
"auditStatus": {
"readOnly": true,
"type": "string"
},
"createdBy": {
"readOnly": true,
"type": "string"
},
"createdDate": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"customValidationId": {
"format": "int32",
"type": "integer"
},
"dataContractColumnId": {
"format": "int32",
"type": "integer"
},
"id": {
"format": "int32",
"type": "integer"
},
"lastModifiedBy": {
"readOnly": true,
"type": "string"
},
"lastModifiedDate": {
"format": "date-time",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"description": {
"type": "string"
},
"id": {
"format": "int32",
"readOnly": true,
"type": "integer"
},
"isActive": {
"type": "boolean"
},
"lastModifiedBy": {
"readOnly": true,
"type": "string"
},
"lastModifiedDate": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"name": {
"type": "string"
},
"parameterType": {
"type": "string"
},
"rule": {
"type": "string"
},
"scalarModelContractValidations": {
"items": {
"properties": {
"auditStatus": {
"readOnly": true,
"type": "string"
},
"createdBy": {
"readOnly": true,
"type": "string"
},
"createdDate": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"customValidationId": {
"format": "int32",
"type": "integer"
},
"id": {
"format": "int32",
"type": "integer"
},
"lastModifiedBy": {
"readOnly": true,
"type": "string"
},
"lastModifiedDate": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"scalarModelContractId": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
}
},
Output:
"schema": {
"type": "array",
"items": {
"properties": {
"auditStatus": {
"type": "string",
"readOnly": true
},
"columnType": {
"type": "string"
},
"createdBy": {
"type": "string",
"readOnly": true
},
"createdDate": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"customValidationType": {
"type": "string"
},
"dataContractColumnValidations": {
"type": "array",
"items": {
"properties": {
"auditStatus": {
"type": "string",
"readOnly": true
},
"createdBy": {
"type": "string",
"readOnly": true
},
"createdDate": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"customValidationId": {
"type": "integer",
"format": "int32"
},
"dataContractColumnId": {
"type": "integer",
"format": "int32"
},
"id": {
"type": "integer",
"format": "int32"
},
"lastModifiedBy": {
"type": "string",
"readOnly": true
},
"lastModifiedDate": {
"type": "string",
"format": "date-time",
"readOnly": true
}
},
"type": "object"
}
},
"description": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int32",
"readOnly": true
},
"isActive": {
"type": "boolean"
},
"lastModifiedBy": {
"type": "string",
"readOnly": true
},
"lastModifiedDate": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"name": {
"type": "string"
},
"parameterType": {
"type": "string"
},
"rule": {
"type": "string"
},
"scalarModelContractValidations": {
"type": "array",
"items": {
"properties": {
"auditStatus": {
"type": "string",
"readOnly": true
},
"createdBy": {
"type": "string",
"readOnly": true
},
"createdDate": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"customValidationId": {
"type": "integer",
"format": "int32"
},
"id": {
"type": "integer",
"format": "int32"
},
"lastModifiedBy": {
"type": "string",
"readOnly": true
},
"lastModifiedDate": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"scalarModelContractId": {
"type": "integer",
"format": "int32"
}
},
"type": "object"
}
}
},
"type": "object"
}
}
},
- Lingua principale
- JavaScript
- Stelle
- 177
- Fork
- 30
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna 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 thim81/openapi-format
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
thim81/openapi-format#238 · 1 commento · 1 assegnatario ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
thim81/openapi-format#239 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
thim81/openapi-format#237 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
thim81/openapi-format#232 · 3 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
thim81/openapi-format#196 · 3 commenti ·
Tutte le issue di thim81/openapi-format
Issue simili
-
feature task
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
RealDevSquad/website-www#1178 ·
-
add latest sol modelAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
netlify-labs/nax#56 · 2 commenti · 1 reazione ·
-
accessibility bug revealjs
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
quarto-dev/quarto-cli#14961 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
PnX-SI/GeoNature#4435 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
openlayers/openlayers#17648 ·
I maintainer di solito rispondono entro 1 giorno