Skip to content

Commit b60fb87

Browse files
Enum array not showing enum values (#22)
* chore(demo): add enum-test RAML spec * fix(enum): when getting inKey value, deconstruct if is array * chore(deps): upgrade deps * test: add test for array of enum values * 4.2.11
1 parent 1f67d66 commit b60fb87

File tree

6 files changed

+806
-639
lines changed

6 files changed

+806
-639
lines changed

demo/apis.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"APIC-483/APIC-483.raml": "RAML 1.0",
1212
"APIC-631/APIC-631.raml": "RAML 1.0",
1313
"SE-19500/SE-19500.raml": "RAML 1.0",
14+
"enum-test/enum-test.raml": "RAML 1.0",
1415
"APIC-429/APIC-429.yaml": { "type": "OAS 3.0", "mime": "application/yaml" },
1516
"SE-17897/SE-17897.yaml": { "type": "OAS 3.0", "mime": "application/yaml" },
1617
"new-oas3-types/new-oas3-types.yaml": { "type": "OAS 3.0", "mime": "application/yaml" },

demo/enum-test/enum-test.raml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#%RAML 1.0
2+
title: Australian Trade Mark Search API
3+
description: 'Australian Trade Mark Search API.'
4+
version: v1
5+
6+
types:
7+
TrademarkApiAdvancedSearch:
8+
type: object
9+
properties:
10+
Working1?:
11+
type: TrademarkPierreWorking1Type
12+
Working2?:
13+
type: TrademarkPierreWorking2Type
14+
Working3?:
15+
type: TrademarkPierreWorking3Type
16+
NotWorking?:
17+
type: TrademarkPierreNotWorkingType
18+
TrademarkPierreWorking1Type:
19+
type: object
20+
properties:
21+
foo1:
22+
type: string
23+
enum:
24+
- NON_USE
25+
- INTERNATIONAL_REGISTRATION
26+
- REGULATED
27+
- SERIES
28+
TrademarkPierreWorking2Type:
29+
type: array
30+
items:
31+
type: object
32+
properties:
33+
foo2:
34+
type: string
35+
enum:
36+
- NON_USE
37+
- INTERNATIONAL_REGISTRATION
38+
- REGULATED
39+
- SERIES
40+
TrademarkPierreWorking3Type:
41+
type: string
42+
enum:
43+
- NON_USE
44+
- INTERNATIONAL_REGISTRATION
45+
- REGULATED
46+
- SERIES
47+
TrademarkPierreNotWorkingType:
48+
type: array
49+
items:
50+
type: string
51+
enum:
52+
- NON_USE
53+
- INTERNATIONAL_REGISTRATION
54+
- REGULATED
55+
- SERIES
56+
57+
/testEndpoint:
58+
post:
59+
displayName: Paged Advanced Search
60+
description: Returns a pageable list of Trade Marks with their details.
61+
body:
62+
application/json:
63+
description: Trade Mark Advanced Search payload
64+
type: TrademarkApiAdvancedSearch

0 commit comments

Comments
 (0)