redocly CLI minium reproduction

This commit is contained in:
Luke Hagar
2024-07-16 17:39:57 +00:00
commit 8edf3591a3
5 changed files with 68 additions and 0 deletions

4
makefile Normal file
View File

@@ -0,0 +1,4 @@
.PHONY: repro
repro:
redocly split ./openapi.yaml --outDir ./openapi

33
openapi.yaml Normal file
View File

@@ -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"

View File

@@ -0,0 +1,5 @@
type: object
properties:
message:
type: string
example: An error occurred

8
openapi/openapi.yaml Normal file
View File

@@ -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

18
openapi/paths.yaml Normal file
View File

@@ -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'