sort - order not always preserved on certain sub-objects
@thim81 がすでに取り組んでいます。
2023年7月9日 から。
評価
この issue はまだ評価されていません。
説明
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"
}
}
},
- 主要言語
- JavaScript
- スター
- 177
- フォーク
- 30
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
thim81/openapi-format のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
thim81/openapi-format#238 · コメント 1 件 · 担当者 1 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
thim81/openapi-format#239 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
thim81/openapi-format#237 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
thim81/openapi-format#232 · コメント 3 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
thim81/openapi-format#196 · コメント 3 件 ·
thim81/openapi-format の issue をすべて見る
似ている issue
-
refactor
難易度 2/5 半日 初心者へのやさしさ 84/100
メンテナーはふだん 5 日以内に返信
-
translation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ciderapp/translations#87 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
component: split-view platform: windows
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
zen-browser/desktop#15616 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信