Skip to content

Commit 89f068c

Browse files
committed
clean up
1 parent de4f611 commit 89f068c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

openapi-processor-core/src/main/kotlin/io/openapiprocessor/core/model/Endpoint.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ class Endpoint(
3131
}
3232

3333
/**
34-
* all possible responses for an openapi status ('200', '2xx',... or 'default'). If the given
35-
* status has no responses the result is an empty list.
34+
* all possible responses for an openapi status ('200', '2xx', ... or 'default'). If the given
35+
* status has no responses, the result is an empty list.
3636
*
3737
* @param status the response status
3838
* @return the list of responses
3939
*/
40+
@Deprecated("only used in class")
4041
private fun getResponses (status: String): List<Response> {
4142
if (!responses.containsKey (status)) {
4243
return emptyList()
@@ -53,6 +54,7 @@ class Endpoint(
5354
*
5455
* @return the set of content types
5556
*/
57+
@Deprecated("only used in test")
5658
fun getConsumesContentTypes(): Set<String> {
5759
val contentTypes = requestBodies
5860
.map { it.contentType }
@@ -70,7 +72,7 @@ class Endpoint(
7072
}
7173

7274
// not needed.... => EndpointResponse.getContentTypes()
73-
// only called by tests?
75+
@Deprecated("only used in test")
7476
fun getProducesContentTypes (status: String): List<String> {
7577
val responses = getResponses (status)
7678
val errors = getErrorResponses ()
@@ -96,6 +98,8 @@ class Endpoint(
9698
*
9799
* @param status the response status
98100
* @return first response of status
101+
*
102+
* only used in test
99103
*/
100104
fun getFirstResponse (status: String): Response? {
101105
if (!responses.containsKey (status)) {

openapi-processor-core/src/main/kotlin/io/openapiprocessor/core/model/EndpointResponse.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class EndpointResponse(
3030
*/
3131
private val successes: List<Response> = listOf()
3232
) {
33-
33+
// todo all have the same, maybe pass as parameter
3434
val contentType: String
3535
get() = main.contentType
3636

@@ -97,6 +97,8 @@ class EndpointResponse(
9797

9898
/**
9999
* returns a list with all content types.
100+
*
101+
* todo only called by test code
100102
*/
101103
val contentTypes: Set<String>
102104
get() {

0 commit comments

Comments
 (0)