Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class GeneratrEndToEndTest extends GeneratrTestBase {
new TestSet(name: 'response-complex-data-types'),
new TestSet(name: 'response-simple-data-types'),
new TestSet(name: 'params-simple-data-types'),
new TestSet(name: 'params-complex-data-types')
]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ class GeneratrPendingTest extends GeneratrTestBase {
@Parameterized.Parameters(name = "{0}")
static Collection<TestSet> sources () {
return [
// new TestSet(name: 'params-complex-data-types') // todo
new TestSet(name: 'params-additional')
new TestSet(name: 'params-complex-data-types')
]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@

package generated.api;

import generated.model.Props;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

public interface EndpointApi {
public interface Api {

@GetMapping(path = "/endpoint-object")
ResponseEntity<Void> getEndpointObject(@RequestParam Props props);

@GetMapping(path = "/endpoint-map")
ResponseEntity<Void> getEndpointMap(@RequestParam(name = "props") Map props);
ResponseEntity<Void> getEndpointObject(Props props);

}
Empty file.
88 changes: 4 additions & 84 deletions src/testInt/resources/params-complex-data-types/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,108 +7,28 @@ paths:

/endpoint-object:
get:
tags:
- endpoint
description: <
should be mapped to a `Props` pojo without `@RequestParam` annotation
parameters:
- name: props
description: query, not required, object
description: query parameter object
in: query
required: false
explode: true
schema:
$ref: '#/components/schemas/Props'
responses:
'204':
description: empty

/endpoint-map:
get:
tags:
- endpoint
parameters:
- name: props
description: query, not required, map from single property
in: query
required: false
schema:
$ref: '#/components/schemas/SinglePropMap'
responses:
'204':
description: empty

# /endpoint-map-all:
# get:
# tags:
# - endpoint
# parameters:
# - name: props
# description: query, not required, map from all properties
# in: query
# required: false
# schema:
# $ref: '#/components/schemas/Props'
# x-java-type: java.util.Map<String, String>
# responses:
# '204':
# description: empty
#
# /endpoint-multimap:
# get:
# tags:
# - endpoint
# parameters:
# - name: props
# description: query, not required, map from all properties
# in: query
# required: false
# schema:
# $ref: '#/components/schemas/Props'
# x-java-type: org.springframework.util.MultiValueMap<String,String>
# responses:
# '204':
# description: empty

components:

schemas:

Props:
type: object
properties:
prop1:
type: string
default: "1"
prop2:
type: string
default: "2"

SinglePropMap:
type: object
x-java-type: java.util.Map
properties:
prop1:
type: string
prop2:
type: string

# PropsMap:
# type: object
# x-java-type: java.util.Map<String>
# properties:
# prop1:
# type: string
# prop2:
# type: string

#
# MultiPropsMap:
# type: object
# x-java-type: org.springframework.util.MultiValueMap<String,String>
# properties:
# prop1:
# type: array
# items:
# type: string
# prop2:
# type: array
# items:
# type: string