Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit 9e607d6

Browse files
committed
primitive mapping test
1 parent 9c7ca1b commit 9e607d6

File tree

6 files changed

+59
-0
lines changed

6 files changed

+59
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
items:
2+
- generated/api/Api.java
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* This class is auto generated by https://github.com/hauner/openapi-processor-core.
3+
* TEST ONLY.
4+
*/
5+
6+
package generated.api;
7+
8+
import annotation.Mapping;
9+
import annotation.Parameter;
10+
import java.util.UUID;
11+
12+
public interface Api {
13+
14+
@Mapping("/uuid")
15+
void getUuid(@Parameter UUID uuid, @Parameter UUID uuidex);
16+
17+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
items:
2+
- inputs/openapi.yaml
3+
- inputs/primitive.yaml
4+
- inputs/mapping.yaml
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
openapi-processor-spring: v2
2+
3+
options:
4+
package-name: generated
5+
6+
map:
7+
types:
8+
- type: UUID => java.util.UUID
9+
- type: UUID_EX => java.util.UUID
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
openapi: 3.0.2
2+
info:
3+
title: API
4+
version: 1.0.0
5+
6+
paths:
7+
/uuid:
8+
get:
9+
parameters:
10+
- in: query
11+
name: uuid
12+
schema:
13+
$ref: '#/components/schemas/UUID'
14+
- in: query
15+
name: uuidex
16+
schema:
17+
$ref: 'primitive.yaml#/UUID_EX'
18+
responses:
19+
'204':
20+
description: none
21+
22+
components:
23+
schemas:
24+
UUID:
25+
type: string
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
UUID_EX:
2+
type: string

0 commit comments

Comments
 (0)