From 8edf3591a3dcc2d3d5e5ab7c11d77ae9441582cf Mon Sep 17 00:00:00 2001 From: Luke Hagar Date: Tue, 16 Jul 2024 17:39:57 +0000 Subject: [PATCH] redocly CLI minium reproduction --- makefile | 4 ++++ openapi.yaml | 33 +++++++++++++++++++++++++++ openapi/components/schemas/Error.yaml | 5 ++++ openapi/openapi.yaml | 8 +++++++ openapi/paths.yaml | 18 +++++++++++++++ 5 files changed, 68 insertions(+) create mode 100644 makefile create mode 100644 openapi.yaml create mode 100644 openapi/components/schemas/Error.yaml create mode 100644 openapi/openapi.yaml create mode 100644 openapi/paths.yaml diff --git a/makefile b/makefile new file mode 100644 index 0000000..461c54a --- /dev/null +++ b/makefile @@ -0,0 +1,4 @@ +.PHONY: repro + +repro: + redocly split ./openapi.yaml --outDir ./openapi \ No newline at end of file diff --git a/openapi.yaml b/openapi.yaml new file mode 100644 index 0000000..6effbb2 --- /dev/null +++ b/openapi.yaml @@ -0,0 +1,33 @@ +openapi: 3.1.0 +info: + title: "My API" + version: "1.0.0" + description: "reproduce redocly cli split issue" +paths: + /: + get: + responses: + '200': + description: "OK" + content: + application/json: + schema: + type: "object" + properties: + message: + type: "string" + example: "Hello, world!" + '400': + description: "Bad Request" + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +components: + schemas: + Error: + type: "object" + properties: + message: + type: "string" + example: "An error occurred" \ No newline at end of file diff --git a/openapi/components/schemas/Error.yaml b/openapi/components/schemas/Error.yaml new file mode 100644 index 0000000..b5045db --- /dev/null +++ b/openapi/components/schemas/Error.yaml @@ -0,0 +1,5 @@ +type: object +properties: + message: + type: string + example: An error occurred diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml new file mode 100644 index 0000000..714e004 --- /dev/null +++ b/openapi/openapi.yaml @@ -0,0 +1,8 @@ +openapi: 3.1.0 +info: + title: My API + version: 1.0.0 + description: reproduce redocly cli split issue +paths: + /: + $ref: paths.yaml diff --git a/openapi/paths.yaml b/openapi/paths.yaml new file mode 100644 index 0000000..867580c --- /dev/null +++ b/openapi/paths.yaml @@ -0,0 +1,18 @@ +get: + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Hello, world! + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error'