Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nitropack version #1084

Open
1 of 2 tasks
geromegrignon opened this issue May 6, 2024 · 5 comments
Open
1 of 2 tasks

Update nitropack version #1084

geromegrignon opened this issue May 6, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@geromegrignon
Copy link
Contributor

geromegrignon commented May 6, 2024

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

  • Yes
  • No
@geromegrignon geromegrignon added the enhancement New feature or request label May 6, 2024
@nckirik
Copy link
Contributor

nckirik commented May 6, 2024

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

@brandonroberts
Copy link
Member

Sounds good. Shouldn't be a breaking change

@geromegrignon
Copy link
Contributor Author

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

@nckirik
Copy link
Contributor

nckirik commented May 8, 2024

It seems we'll need to wait for nitropack@2.10.0 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.

@geromegrignon
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants