Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add openapi support to SE #558

Merged
merged 27 commits into from
May 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e029bbb
Preliminary OpenAPI support for SE
tjquinno Apr 4, 2019
e9ce496
Additional files for prelim OpenAPI support in SE
tjquinno Apr 4, 2019
2b52033
Move test to correct package
tjquinno Apr 4, 2019
2262d32
Style fixes, add module-info and package-info
tjquinno Apr 5, 2019
5e9906e
Add extension point to OpenAPISupport for dealing with annotated clas…
tjquinno Apr 7, 2019
8a10055
Add use of Jandex for OpenAPI anno handling - not used for SE but wil…
tjquinno Apr 10, 2019
23b6526
Merge remote-tracking branch 'origin/master' into add-openapi
tjquinno Apr 10, 2019
2f76582
Use correct Helidon version in the pom
tjquinno Apr 10, 2019
f3d4850
Fix copyright date in MediaType.java
tjquinno Apr 10, 2019
b1c9c5e
Fix checkstyle complaint
tjquinno Apr 10, 2019
3868880
Rework some of the code to avoid spotbugs errors about open streams e…
tjquinno Apr 10, 2019
d640e6f
Merge remote-tracking branch 'origin/master' into add-openapi
tjquinno Apr 18, 2019
875a67e
Add unit tests and some refinements to OpenAPISupport class
tjquinno Apr 19, 2019
27901d2
Merge remote-tracking branch 'origin/master' into add-openapi
tjquinno Apr 19, 2019
ce69095
Tried adding copyright to field in yaml; worked locally but not in pi…
tjquinno Apr 19, 2019
444c67f
Ah ha! Fixed copyright the right way
tjquinno Apr 19, 2019
f20fbd6
Add tests to check return media type; add generic yaml MT to MediaType
tjquinno Apr 20, 2019
cf07608
Add JavaDoc comment to new public static
tjquinno Apr 20, 2019
9dd51fb
Add more tests, refactor common code into public static methods, add …
tjquinno Apr 22, 2019
b4bc8f8
Refactor utility methods to a new class to clarify ServerTest
tjquinno Apr 23, 2019
a674a2b
Some minor method renaming, reformatting, etc.
tjquinno Apr 23, 2019
c6f709b
Minor JavaDoc edit
tjquinno Apr 23, 2019
4e7929c
Add test to make sure the filter removes the expected path from the O…
tjquinno Apr 23, 2019
46f1bba
Clean up some Optional usages
tjquinno Apr 23, 2019
5bbb80d
Merge remote-tracking branch 'origin/master' into add-openapi
tjquinno Apr 23, 2019
39cd982
Refine annotation handling suppression to simplify use from MP
tjquinno Apr 24, 2019
2161817
Combine with concurrent changes
tjquinno May 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,12 @@
<artifactId>helidon-graal-native-image-extension</artifactId>
<version>${project.version}</version>
</dependency>
<!-- SE OpenAPI support -->
<dependency>
<groupId>io.helidon.openapi</groupId>
<artifactId>helidon-openapi</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
17 changes: 16 additions & 1 deletion common/http/src/main/java/io/helidon/common/http/MediaType.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018,2019 Oracle and/or its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -88,6 +88,21 @@ public final class MediaType implements AcceptPredicate<MediaType> {
* A {@link MediaType} constant representing {@code text/html} media type.
*/
public static final MediaType TEXT_HTML = createMediaType("text", "html");
/**
* A {@link MediaType} constant representing OpenAPI yaml.
* <p>
* See https://github.com/opengeospatial/WFS_FES/issues/117#issuecomment-402188280
*/
public static final MediaType APPLICATION_OPENAPI_YAML = createMediaType("application", "vnd.oai.openapi");
/**
* A {@link MediaType} constant representing OpenAPI json.
*/
public static final MediaType APPLICATION_OPENAPI_JSON = createMediaType("application", "vnd.oai.openapi+json");

/**
* A {@link MediaType} constant representing YAML.
*/
public static final MediaType APPLICATION_YAML = createMediaType("application", "x-yaml");

private static final MediaType APPLICATION_JAVASCRIPT = createMediaType("application", "javascript");

Expand Down
89 changes: 89 additions & 0 deletions openapi/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.helidon</groupId>
<artifactId>helidon-project</artifactId>
<version>1.0.4-SNAPSHOT</version>
</parent>
<groupId>io.helidon.openapi</groupId>
<artifactId>helidon-openapi</artifactId>

<name>Helidon OpenAPI</name>

<description>
OpenAPI implementation
</description>

<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>io.helidon.webserver</groupId>
<artifactId>helidon-webserver</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.media.jsonp</groupId>
<artifactId>helidon-media-jsonp-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config-yaml</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Loading