Skip to content

Commit 56b9696

Browse files
committed
removed obsolete data type
1 parent 0985e0f commit 56b9696

File tree

2 files changed

+8
-54
lines changed

2 files changed

+8
-54
lines changed

src/main/groovy/com/github/hauner/openapi/spring/model/datatypes/InlineObjectDataType.groovy

Lines changed: 0 additions & 49 deletions
This file was deleted.

src/test/groovy/com/github/hauner/openapi/spring/writer/MethodWriterSpec.groovy

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 the original authors
2+
* Copyright 2019-2020 the original authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,7 +25,6 @@ import com.github.hauner.openapi.spring.model.datatypes.CollectionDataType
2525
import com.github.hauner.openapi.spring.model.datatypes.DataTypeConstraints
2626
import com.github.hauner.openapi.spring.model.datatypes.DoubleDataType
2727
import com.github.hauner.openapi.spring.model.datatypes.FloatDataType
28-
import com.github.hauner.openapi.spring.model.datatypes.InlineObjectDataType
2928
import com.github.hauner.openapi.spring.model.datatypes.IntegerDataType
3029
import com.github.hauner.openapi.spring.model.datatypes.ListDataType
3130
import com.github.hauner.openapi.spring.model.datatypes.LongDataType
@@ -87,8 +86,12 @@ class MethodWriterSpec extends Specification {
8786

8887
void "writes parameter less method with inline object response type" () {
8988
def endpoint = new Endpoint (path: '/inline', method: HttpMethod.GET, responses: [
90-
new Response(contentType: 'application/json',
91-
responseType: new InlineObjectDataType())
89+
new Response (contentType: 'application/json',
90+
responseType: new ObjectDataType (
91+
type: 'GetInlineResponse', properties: [
92+
foo1: new StringDataType (),
93+
foo2: new StringDataType ()
94+
]))
9295
])
9396

9497
when:
@@ -97,7 +100,7 @@ class MethodWriterSpec extends Specification {
97100
then:
98101
target.toString () == """\
99102
@GetMapping(path = "${endpoint.path}", produces = {"${endpoint.response.contentType}"})
100-
ResponseEntity<Map<String, Object>> getInline();
103+
ResponseEntity<GetInlineResponse> getInline();
101104
"""
102105
}
103106

0 commit comments

Comments
 (0)