analog icon indicating copy to clipboard operation
analog copied to clipboard

Update nitropack version

Open geromegrignon opened this issue 1 year ago • 5 comments

Which scope/s are relevant/related to the feature request?

vite-plugin-nitro

Information

@analog/platformdepends on 2.6.0 nitropack version. Updating to the latest version would allow, among other things, to explore experimental support to websotckets and built-in swagger UI and openapi auto-generated definition.

Describe any alternatives/workarounds you're currently using

No response

I would be willing to submit a PR to fix this issue

  • [X] Yes
  • [ ] No

geromegrignon avatar May 06 '24 22:05 geromegrignon

looking forward to this. if needed I can also work on this.

nckirik avatar May 06 '24 22:05 nckirik

Sounds good. Shouldn't be a breaking change

brandonroberts avatar May 06 '24 22:05 brandonroberts

Hi @nckirik feel free to contribute if you want to :)

geromegrignon avatar May 07 '24 14:05 geromegrignon

It seems we'll need to wait for [email protected] to be released. Especially for the openAPI "root" configuration. Currently, it is only available in nitro's nightly channel. As @brandonroberts mentioned before, all other config options correctly reflect directly from Nitro's NitroConfig type.

Nitro's config documentation regarding these experimental options appears somewhat misleading, in my opinion.

Initially when we were discussing this with @geromegrignon, I assumed a syntax similar to the following for configuring openAPI within Nitro's config.

        nitro: {
          ...
          experimental: {
            openAPI: {
              meta: {
                title: 'My Awesome Project',
                description: 'This might become the next big thing.',
                version: '1.0'
              }
            }
            ...
          }
          ...
        }

However, it turns out this assumption was incorrect. In reality, openAPI config should be a boolean to enable the experimental feature and a separate root config object to configure it, like so:

        nitro: {
          experimental: {
            openAPI: true,
          },
          openAPI: {
            meta: {
              title: 'My Awesome Project',
              description: 'This might become the next big thing.',
              version: '1.0',
            },
          },
        },

And since this openAPI root configuration is only available in the nightly build, I think there is nothing to do for now.

nckirik avatar May 08 '24 16:05 nckirik

Thanks for the feedback. I assumed about the same for openapi 😅

geromegrignon avatar May 08 '24 17:05 geromegrignon

I think the latest 2.9.x release of nitropack includes these features

brandonroberts avatar Aug 30 '24 13:08 brandonroberts