forked from stoicflame/enunciate-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stoicflame#32 Added end to end test for EnunciateTestsGenerator
- Loading branch information
Showing
6 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
.../dk/jyskebank/tools/enunciate/modules/openapi/confignamespacewithprefix/DataResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package dk.jyskebank.tools.enunciate.modules.openapi.confignamespacewithprefix; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
import javax.ws.rs.core.Response; | ||
|
||
import com.webcohesion.enunciate.metadata.rs.TypeHint; | ||
|
||
@Path("/path") | ||
public class DataResource { | ||
|
||
@TypeHint(DataXmlDTO.class) | ||
@GET | ||
@Path("/xmldto") | ||
@Produces(MediaType.APPLICATION_XML) | ||
public Response getXmlType() { | ||
return Response.ok(new DataXmlDTO()).build(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...va/dk/jyskebank/tools/enunciate/modules/openapi/confignamespacewithprefix/DataXmlDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package dk.jyskebank.tools.enunciate.modules.openapi.confignamespacewithprefix; | ||
|
||
import javax.xml.bind.annotation.*; | ||
|
||
@XmlType(name = "dataXmlDTO", namespace = "http://www.jyskebank.dk/enunciate/openapi/version/1") | ||
@XmlRootElement(name="dataXmlDTO", namespace = "http://www.jyskebank.dk/enunciate/openapi/version/1") | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
public class DataXmlDTO { | ||
@XmlElement(name="aString") | ||
private String aString; | ||
|
||
@XmlElement | ||
private DataXmlEnum anEnum; | ||
} |
9 changes: 9 additions & 0 deletions
9
...a/dk/jyskebank/tools/enunciate/modules/openapi/confignamespacewithprefix/DataXmlEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package dk.jyskebank.tools.enunciate.modules.openapi.confignamespacewithprefix; | ||
|
||
import javax.xml.bind.annotation.XmlEnum; | ||
|
||
@XmlEnum | ||
public enum DataXmlEnum { | ||
GOOD, | ||
MORNING; | ||
} |
8 changes: 8 additions & 0 deletions
8
.../jyskebank/tools/enunciate/modules/openapi/confignamespacewithprefix/RestApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package dk.jyskebank.tools.enunciate.modules.openapi.confignamespacewithprefix; | ||
|
||
import javax.ws.rs.ApplicationPath; | ||
import javax.ws.rs.core.Application; | ||
|
||
@ApplicationPath("rest") | ||
public class RestApplication extends Application { | ||
} |
14 changes: 14 additions & 0 deletions
14
...java/dk/jyskebank/tools/enunciate/modules/openapi/confignamespacewithprefix/enunciate.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<enunciate version="version" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.11.1.xsd"> | ||
|
||
<namespaces> | ||
<namespace uri="http://www.jyskebank.dk/enunciate/openapi/version/1" id="prefix-a"/> | ||
</namespaces> | ||
|
||
<modules disabledByDefault="true"> | ||
<openapi disabled="false" skipBase="false" /> | ||
<jaxrs groupBy="class" disabled="false" /> | ||
<jackson disabled="false" /> | ||
<jaxb disabled="false" /> | ||
</modules> | ||
</enunciate> |
46 changes: 46 additions & 0 deletions
46
...t/java/dk/jyskebank/tools/enunciate/modules/openapi/confignamespacewithprefix/openapi.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: "Web Service API" | ||
version: "version" | ||
description: "" | ||
servers: [] | ||
paths: | ||
"/path/xmldto": | ||
get: | ||
description: "" | ||
tags: | ||
- "DataResource" | ||
summary: "" | ||
deprecated: false | ||
operationId: getXmlType | ||
responses: | ||
"200": | ||
description: "" | ||
content: | ||
"*/*": | ||
schema: | ||
$ref: "#/components/schemas/xml_prefix-a_dataXmlDTO" | ||
|
||
components: | ||
schemas: | ||
"xml_ns0_dataXmlEnum": | ||
title: "dataXmlEnum" | ||
type: string | ||
enum: | ||
- "GOOD" | ||
- "MORNING" | ||
"xml_prefix-a_dataXmlDTO": | ||
title: "dataXmlDTO" | ||
allOf: | ||
- type: string | ||
format: binary | ||
- type: object | ||
properties: | ||
"aString": | ||
type: string | ||
"anEnum": | ||
$ref: "#/components/schemas/xml_ns0_dataXmlEnum" | ||
xml: | ||
name: dataXmlDTO | ||
namespace: http://www.jyskebank.dk/enunciate/openapi/version/1 | ||
prefix: prefix-a |