johannschopplich / nuxt-api-party

🐬 Securely connect to any API with a server proxy and generated composables
https://nuxt-api-party.byjohann.dev
MIT License
260 stars 10 forks source link

Interceptors are missing when using OpenAPI schema #84

Closed nathanchase closed 1 month ago

nathanchase commented 1 month ago

Environment


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 commented 1 month ago

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