В моем Swagger я определил безопасность и безопасность Схемы на основе этой документации
Документация по аутентификации ключей
в Swagger edirotr/ я вижу кнопку авторизации

мы также можем видеть поля и при проверке CURL с выполненными заголовками

Но в документации Local Swagger API авторизация отсутствует, только если бы у меня была программа, я что-то вижу, но не работает.
Есть идеи, к а к м н е п о с т у п и т ь ? < / p > < b r / > з д е с ь с г е н е р и р о в а н о л о к а л ь н о е ч в а н с т в о < b r / > < i m g a l t = " в в е д и т е о п и с а н и е и з о б р а ж е н и я з д е с ь " s r c = " h t t p s : / / i . s s t a t i c . n e t / 8 7 S D i 3 T K . p n g " / > < / p > < b r / > p o m - ф а й л < / p > < b r / > < c o d e > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - d a t a - m o n g o d b & l t ; / a r t i f a ctId>
org.springframework.boot
spring-boot-starter-data-mongodb-reactive
org.springframework.boot
spring-boot-starter-webflux
org.springdoc
springdoc-openapi-starter-webflux-ui
2.5.0
org.springframework.boot
spring-boot-starter-security
org.openapitools
jackson-databind-nullable
0.2.6
org.springframework.boot
spring-boot-starter-validation
org.springframework.boot
spring-boot-devtools
runtime
true
org.springframework.boot
spring-boot-starter-actuator
org.projectlombok
lombok
true
jakarta.validation
jakarta.validation-api
3.0.2
io.swagger.core.v3
swagger-annotations
2.2.21
org.openapitools
openapi-generator-maven-plugin
7.4.0
generate
${project.basedir}/swagger.yaml
spring
spring-boot
com.telr.tokenization.api
com.telr.tokenization.core.entities
false
false
@lombok.Builder @lombok.AllArgsConstructor
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY)
false
true
true
true
true
true
и мой yaml
openapi: '3.1.0'
info:
version: 1.0.0
title: open api generator
termsOfService: http://swagger.io/terms/
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
contact:
name: Support
email: [email protected]
servers:
- url: http://localhost:8081
description: local
security:
- apiKey: []
apiSecret: []
paths:
/test:
post:
tags:
- test
summary: Create test
description: Create test
operationId: createTest
requestBody:
description: test object
content:
application/json:
schema:
$ref: '#/components/schemas/TestRequest'
required: true
responses:
'201':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/TestResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/test/{id}:
get:
tags:
- "test"
summary: "get object"
description: "Returns object"
operationId: "getObject"
parameters:
- name: id
in: path
description: Gateway token generated in the network tokenization process
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/TestResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Token not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
TestResponse:
type: object
properties:
id:
type: string
value:
type: string
TestRequest:
type: object
properties:
number:
type: string
description: The card number ex:1234 1234 1234 1243
ErrorResponse:
type: object
properties:
status:
type: integer
format: int32
description: Request status
type:
type: string
description: Error type
code:
type: string
description: Error code
errors:
type: array
items:
type: string
description: List of error messages
securitySchemes:
apiKey:
type: apiKey
name: X-API-KEY
in: header
apiSecret:
type: apiKey
name: X-API-SECRET
in: header
Подробнее здесь: https://stackoverflow.com/questions/784 ... r-doc-from