You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to refer response header in client generate api #2814
I have defined the swagger in order to get the authorization token from the response header which can be used for next api call. However when I generate the client code out of swagger, it return only response body and not the header. I Have tried all the search but nothing was helpful.
Part of the swagger definition,
/token':
post:
tags:
- Token
parameters:
- $ref: '#/components/parameters/Authorization'
description: Used to generate token to call other api
operationId: generateToken
responses:
'200':
description: OK
content:
Application/Json:
schema:
type: array
items:
$ref: '#/components/schemas/XYZ'
headers:
authorization:
schema:
type: string
components:
parameters:
Authorization:
in: header
name: Authorization
description: Bearer token to access the one view API's.
schema:
type: string
required: true
Client Api generate: ( the method body doesnt have any code for response header"
public CompletableFuture<List> generateToken (String authorization) throws ApiException {
....
...}
If you could provide any insight that would be more helpfull
Activity