Skip to content

Commit 7c7cfca

Browse files
authored
fixes #356 split openapi-config module from openapi-meta (#357)
1 parent 356f99e commit 7c7cfca

25 files changed

+1742
-19
lines changed

openapi-config/pom.xml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<!--
2+
~ Copyright (c) 2016 Network New Technologies Inc.
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
-->
16+
17+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
18+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
19+
<modelVersion>4.0.0</modelVersion>
20+
21+
<parent>
22+
<groupId>com.networknt</groupId>
23+
<artifactId>light-rest-4j</artifactId>
24+
<version>2.1.33-SNAPSHOT</version>
25+
<relativePath>../pom.xml</relativePath>
26+
</parent>
27+
28+
<artifactId>openapi-config</artifactId>
29+
<packaging>jar</packaging>
30+
<description>An OpenAPI config module to support admin endpoint injection.
31+
</description>
32+
33+
<dependencies>
34+
<dependency>
35+
<groupId>com.networknt</groupId>
36+
<artifactId>utility</artifactId>
37+
</dependency>
38+
<dependency>
39+
<groupId>com.networknt</groupId>
40+
<artifactId>config</artifactId>
41+
</dependency>
42+
<dependency>
43+
<groupId>com.networknt</groupId>
44+
<artifactId>json-overlay</artifactId>
45+
</dependency>
46+
<dependency>
47+
<groupId>com.networknt</groupId>
48+
<artifactId>openapi-parser</artifactId>
49+
</dependency>
50+
<dependency>
51+
<groupId>com.fasterxml.jackson.core</groupId>
52+
<artifactId>jackson-databind</artifactId>
53+
</dependency>
54+
<dependency>
55+
<groupId>org.slf4j</groupId>
56+
<artifactId>slf4j-api</artifactId>
57+
</dependency>
58+
59+
<dependency>
60+
<groupId>com.networknt</groupId>
61+
<artifactId>client</artifactId>
62+
<scope>test</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>ch.qos.logback</groupId>
66+
<artifactId>logback-classic</artifactId>
67+
<scope>test</scope>
68+
</dependency>
69+
<dependency>
70+
<groupId>junit</groupId>
71+
<artifactId>junit</artifactId>
72+
<scope>test</scope>
73+
</dependency>
74+
</dependencies>
75+
76+
</project>

openapi-meta/src/main/java/com/networknt/openapi/DefaultInjectableSpecValidator.java renamed to openapi-config/src/main/java/com/networknt/openapi/DefaultInjectableSpecValidator.java

File renamed without changes.

openapi-meta/src/main/java/com/networknt/openapi/InjectableSpecValidator.java renamed to openapi-config/src/main/java/com/networknt/openapi/InjectableSpecValidator.java

File renamed without changes.

openapi-meta/src/main/java/com/networknt/openapi/OpenApiHandlerConfig.java renamed to openapi-config/src/main/java/com/networknt/openapi/OpenApiHandlerConfig.java

File renamed without changes.

openapi-meta/src/main/resources/config/openapi-handler.yml renamed to openapi-config/src/main/resources/config/openapi-handler.yml

File renamed without changes.

openapi-meta/src/main/resources/config/openapi-inject.yml renamed to openapi-config/src/main/resources/config/openapi-inject.yml

File renamed without changes.

openapi-meta/src/test/java/com/networknt/openapi/DefaultInjectableSpecValidatorTest.java renamed to openapi-config/src/test/java/com/networknt/openapi/DefaultInjectableSpecValidatorTest.java

File renamed without changes.

openapi-meta/src/test/java/com/networknt/openapi/OpenApiHandlerConfigTest.java renamed to openapi-config/src/test/java/com/networknt/openapi/OpenApiHandlerConfigTest.java

File renamed without changes.
885 Bytes
Binary file not shown.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
enabled: true
3+
4+
# Configuration for the LightHttpHandler. The handler is the base class for all middleware, server and health handlers
5+
# set the Status Object in the AUDIT_INFO, for auditing purposes
6+
# default, if not set:false
7+
auditOnError: true
8+
9+
# set the StackTrace in the AUDIT_INFO, for auditing purposes
10+
# default, if not set:false
11+
auditStackTrace: true
12+
13+
handlers:
14+
- com.networknt.handler.sample.SampleHttpHandler1
15+
- com.networknt.handler.sample.SampleHttpHandler2
16+
- com.networknt.handler.sample.SampleHttpHandler3@third
17+
18+
chains:
19+
secondBeforeFirst:
20+
- com.networknt.handler.sample.SampleHttpHandler2
21+
- com.networknt.handler.sample.SampleHttpHandler1
22+
23+
paths:
24+
- path: '/test'
25+
method: 'get'
26+
exec:
27+
- secondBeforeFirst
28+
- third
29+
- path: '/v2/health'
30+
method: 'post'
31+
exec:
32+
- secondBeforeFirst
33+
- third
34+
# If there is no matched path, then it goes here first. If this is not set, then an error
35+
# will be returned.
36+
defaultHandlers:
37+
- third

0 commit comments

Comments
 (0)