-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[gen] adding test that has previously would have failed - issue has been fixed in another commit Co-authored-by: Nabil Abdel-Hafeez <[email protected]>
- Loading branch information
Showing
3 changed files
with
68 additions
and
0 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,9 @@ | ||
package test.component | ||
|
||
import zio.prelude.Newtype | ||
import zio.schema.Schema | ||
import java.util.UUID | ||
|
||
object Key extends Newtype[UUID] { | ||
implicit val schema: Schema[Key.Type] = Schema.primitive[UUID].transform(wrap, unwrap) | ||
} |
36 changes: 36 additions & 0 deletions
36
zio-http-gen/src/test/resources/inline_schema_alias_only_as_key_schema.yaml
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,36 @@ | ||
info: | ||
title: Dummy Service | ||
version: 0.0.1 | ||
servers: | ||
- url: http://127.0.0.1:5000/ | ||
tags: | ||
- name: Dummy_API | ||
paths: | ||
/api/text_by_key: | ||
get: | ||
operationId: text_by_key | ||
description: Get a dictionary mapping keys to text | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ObjectWithDictionary' | ||
description: OK | ||
openapi: 3.0.3 | ||
components: | ||
schemas: | ||
Key: | ||
type: string | ||
format: uuid | ||
ObjectWithDictionary: | ||
type: object | ||
required: | ||
- dict | ||
properties: | ||
dict: | ||
type: object | ||
additionalProperties: | ||
type: string | ||
x-string-key-schema: | ||
$ref: '#/components/schemas/Key' |
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