-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swagger-cli validateがvalidとなるapi.jsonを作れるようにする (#12403)
* api.jsonがswagger-cli validateでエラーにならないように生成ロジックを修正 * フィールドの消し方に不備があったので変更 * バックエンドを起動しなくてもapi.jsonを作れるようにした * deepCopyしてからレスポンス部分を作るようにした * fix CHANGELOG.md * securitySchemesの定義を復活&ApiCallServiceの実装的にベアラトークンなのでその形で * bodyが無い(空オブジェクト)のときはrequestBodyを描画しないようにする * allowGetがtrueな項目はget用の記載も作成 --------- Co-authored-by: osamu <[email protected]> Co-authored-by: syuilo <[email protected]>
- Loading branch information
1 parent
a4f8863
commit c284d41
Showing
6 changed files
with
51 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { loadConfig } from './built/config.js' | ||
import { genOpenapiSpec } from './built/server/api/openapi/gen-spec.js' | ||
import { writeFileSync } from "node:fs"; | ||
|
||
const config = loadConfig(); | ||
const spec = genOpenapiSpec(config); | ||
|
||
writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters