Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@joe-king-sh さん
https://dev.classmethod.jp/articles/fastify-zod-openapi/ ですが、非常に興味深い記事で参考になりました。ありがとうございます。
ただ、記事の執筆日から現在にかけて@fasify/fastify-swaggerの仕様がv7->v8で変更になったことが原因で、
記事の手順通りではswagger-uiを表示出来ない現象が起こり、少しハマりました。
(※新しく出来た@fastify/fastify-swagger-uiを追加して
src/app.ts
の処理を微修正する必要がありました。)上記に事象に対応しつつ、現在の最新のパッケージの動かすための修正についてプルリクの形でご参考としてお伝えします。
(特にマージ頂きたい訳ではなく、記事だとコメント欄が無い?のとtwitterなどだと文字数制限で説明が難しそうだったため、というだけの理由です。。。)
結論としては、
または、
@fasify/swagger
のバージョンを7系を明示的に指定するようにするのいずれかの対応が必要な旨を記事に追記頂けるとより良いのではないかと感じました。
ご参考頂けますと非常に幸いです。よろしくお願いいたします。