seriousme / fastify-openapi-glue

A plugin for the Fastify webserver to autogenerate a Fastify configuration based on a OpenApi(v2/v3) specification.
MIT License
206 stars 33 forks source link

zero-dependency cookie schema support #599

Closed pcafstockf closed 3 months ago

pcafstockf commented 3 months ago

This is a PR for the issue discussed in https://github.com/seriousme/fastify-openapi-glue/issues/596

I did include a modification for a problem I was having using 3.0.3 specifications (the plugin seemed to be expecting "2.0", "3.0", or "3.1" only.

Please feel free to change, or ask for changes, as you see fit.

Thanks!

seriousme commented 3 months ago

Frank

thanks for submitting the PR, its a quality piece!

The version 3.0.3 should work fine , see https://github.com/seriousme/fastify-openapi-glue/blob/6d3605ed914f0ca7c79736d572a57da1250e59bd/test/test-plugin.v3.js#L376-L378

The parser abstracts the patch version of the spec away, hence the 2.0, 3.0 and 3.1. as patch versions do not require parser changes.

I'm currently enjoying my holiday, but around august 13 I should be able to release your patch.

Kind regards, Hans

pcafstockf commented 3 months ago

Thanks Hans. I pushed an update to this PR to put back the original version checks in Parser.js. I've been working on a little tool to perform repairs on common specification problems and may have confused myself one time by accidentally passing in a spec with a bogus version number.

seriousme commented 3 months ago

Thanks again Frank!