I have following OpenAPI file, my intention is to define employee, customer, projects endpoints in its own yaml files. However, using the below code is resulting in 'duplicating mapping key' error - this is because the use of '$ref'(consecutively). Is there a way to achieve this segregation?
openapi: 3.0.3
info:
title: example
servers:
- url: https://example.net/api
security:
- apiKey: []
paths:
$ref: './employee/resource.api.yaml'
$ref: './projects/resource.api.yaml'
$ref: './customers/resource.api.yaml'
Updated with file content: employee/resource.api.yaml
/employee/{id}
get:
...
/employee/{id}/addresses
get:
...
projects/resource.api.yaml
/projects/{id}
get:
...
put:
...
/projects/{id}/files
get:
...
/projects/{id}/fies/{fileName}/Content
get:
...