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

Interceptors are missing when using OpenAPI schema #84

Closed
nathanchase opened this issue Sep 26, 2024 · 1 comment
Closed

Interceptors are missing when using OpenAPI schema #84

nathanchase opened this issue Sep 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nathanchase
Copy link

Environment


  • Operating System: Linux
  • Node Version: v22.3.0
  • Nuxt Version: 3.13.2
  • CLI Version: 3.14.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-hi8a9n?file=nuxt.config.ts

Describe the bug

If you add schema to your config and define a Swagger URL, the interceptors are not included on the endpoint.

apiParty: {
  endpoints: {
    myApi: {
      url: 'https://api.mysite.com',
      schema: 'https://api.mysite.com/swagger/v1/swagger.json'
    }
  }
}

Without schema:
image

With schema:
image

Additional context

Expected:

Access to interceptors as outlined here:
https://nuxt-api-party.byjohann.dev/guide/interceptors.html

Logs

No response

@nathanchase
Copy link
Author

nathanchase commented Sep 26, 2024

Possibly something missing from src/runtime/openapi.ts that is only included in useApiData.ts

@johannschopplich johannschopplich changed the title Interceptors are missing when using 'schema' property Interceptors are missing when using OpenAPI schema Sep 26, 2024
@johannschopplich johannschopplich added bug Something isn't working and removed pending triage labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants