Open Maxim-Mazurok opened 1 year ago
We encounter the same issue. For us this doesn't have to be a global option as it is a security schema, so we should add it like a normal parameter to the generated options.
we have the same, so:
securitySchemes:
fooAuth:
type: apiKey
name: X-Foo
in: header
description: 'jaja'
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
Then on the method:
/foo/{bar}/snip:
post:
tags: ['Foo']
summary: 'Foo'
security:
- bearerAuth: []
fooAuth: []
Now the bearer is just normal jwt we set it on axios level, but the other option is not possible to be handled over via the hook. At least the option headers: true in the config is not helping me in any way. @melloware did i miss something?
No this is an open enhancement request so @Maxim-Mazurok is stating it currently does not work as expected.
I hoped maybe some config with the operationId :) because fully from openapi spec would in our case be weird with the simple bearer one :)
This is related to #465
However even when using
headers: true
orval doesn't pick up this part of the swagger.json:Ideally, I would like to have some sort of global way of setting it up which would be type-safe.
When using openapi-generator we used to pass it into Configuration:
Later that configuration was used like this:
const appApi = new AppApi(configuration)