forked from guardrail-dev/guardrail
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Circe - fully qualify class names for components and properties
Previously, when a property was named the same as its component, references to the component class and property class conflicted, causing errors. Fully qualifying the references to each should prevent this from happening. A regression test covering a minimal failing case is included. Fixes issue guardrail-dev#2050
- Loading branch information
Showing
3 changed files
with
67 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Minimal Error Case | ||
description: Testing that internal naming conflicts do not occur when a component and its own property have the same name | ||
version: "1.0" | ||
servers: | ||
- url: "http://localhost:1234" | ||
paths: | ||
/test: | ||
get: | ||
operationId: Test | ||
responses: | ||
'200': | ||
description: A test | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Test' | ||
components: | ||
schemas: | ||
Test: | ||
title: Test | ||
required: | ||
- test | ||
type: object | ||
properties: | ||
test: | ||
title: test | ||
enum: | ||
- optionA | ||
- optionB | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters