1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

OpenAPI仕様書(Swagger)を書く時に参考にできるサイト

Posted at

そもそもopenAPI仕様書ってこんなものってのを理解する

Swagger公式

サンプル見たりするのに使うかな。
正直見にくい。

GitHubのドキュメント

これが一番使うかな。
yamljsonは階層構造になってて、どんどん深掘りしていける。
components配下のparametersオブジェクトで指定できる項目は?
inに指定できるコードは?
など検索できるのが良い。

HTTPステータスコード一覧

APIですから、ステータスコードに意味をしっかり持たせたいですよね。

個人的に参考にしたサイト

components配下の書き方、$refでの汎用性の持たせ方など、大変参考になりました。

SwaggerとOpenAPI

openapi: 3.0.3
swagger: 2.0
どっちを書くかで思ったよりフォーマットが違ってくる。
なんか最近はopenapiにしといた方が良さげなんかなあ。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?