I want to split the following file.
openapi: "3.0.0"info:
version: 1.0.0title: Swagger Petstorelicense:
name: MITservers:
- url: http://petstore.swagger.io/v1paths:
/pets/{petId}:
get:
summary: Get PetoperationId: showPetByIdsecurity:
- Everyone: [] tags:
- animalsparameters:
- name: petIdin: pathrequired: truedescription: The id of the pet to retrieveschema:
type: stringresponses:
'200':
description: Expected response to a valid requestcontent:
application/json:
schema:
$ref: "#/components/schemas/Pet"components:
securitySchemes:
Everyone:
description: everyonetype: "apiKey"name: "Authorization"in: "header"schemas:
Pet:
required:
- id
- nameproperties:
id:
type: integerformat: int64name:
type: stringtag:
type: stringI write components object to external file.
petstore-parent.yaml
openapi: "3.0.0"info:
version: 1.0.0title: Swagger Petstorelicense:
name: MITservers:
- url: http://petstore.swagger.io/v1paths:
/pets/{petId}:
get:
summary: Get PetoperationId: showPetByIdsecurity:
- Everyone: [] tags:
- animalsparameters:
- name: petIdin: pathrequired: truedescription: The id of the pet to retrieveschema:
type: stringresponses:
'200':
description: Expected response to a valid requestcontent:
application/json:
schema:
$ref: "./petstore-child.yaml#/components/schemas/Pet"petstore-child.yaml
components:
securitySchemes:
Everyone:
description: everyonetype: "apiKey"name: "Authorization"in: "header"schemas:
Pet:
required:
- id
- nameproperties:
id:
type: integerformat: int64name:
type: stringtag:
type: string
But I do not know how I refer to external securitySchema object.
get:
summary: Get PetoperationId: showPetByIdsecurity:
- Everyone: []
How do I refer to external securitySchema object ?
I want to split the following file.
I write
componentsobject to external file.petstore-parent.yamlpetstore-child.yamlBut I do not know how I refer to external
securitySchemaobject.How do I refer to external
securitySchemaobject ?