Skip to content

Commit

Permalink
issue #178
Browse files Browse the repository at this point in the history
- added handler.yml since now specification handler, validator handler, security handler would need base path from handler.yml
  • Loading branch information
BalloonWen committed Apr 26, 2021
1 parent 0573dbb commit a213f0f
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 0 deletions.
37 changes: 37 additions & 0 deletions openapi-meta/src/test/resources/config/handler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
enabled: true

# Configuration for the LightHttpHandler. The handler is the base class for all middleware, server and health handlers
# set the Status Object in the AUDIT_INFO, for auditing purposes
# default, if not set:false
auditOnError: true

# set the StackTrace in the AUDIT_INFO, for auditing purposes
# default, if not set:false
auditStackTrace: true

handlers:
- com.networknt.handler.sample.SampleHttpHandler1
- com.networknt.handler.sample.SampleHttpHandler2
- com.networknt.handler.sample.SampleHttpHandler3@third

chains:
secondBeforeFirst:
- com.networknt.handler.sample.SampleHttpHandler2
- com.networknt.handler.sample.SampleHttpHandler1

paths:
- path: '/test'
method: 'get'
exec:
- secondBeforeFirst
- third
- path: '/v2/health'
method: 'post'
exec:
- secondBeforeFirst
- third
# If there is no matched path, then it goes here first. If this is not set, then an error
# will be returned.
defaultHandlers:
- third
37 changes: 37 additions & 0 deletions openapi-security/src/test/resources/config/handler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
enabled: true

# Configuration for the LightHttpHandler. The handler is the base class for all middleware, server and health handlers
# set the Status Object in the AUDIT_INFO, for auditing purposes
# default, if not set:false
auditOnError: true

# set the StackTrace in the AUDIT_INFO, for auditing purposes
# default, if not set:false
auditStackTrace: true

handlers:
- com.networknt.handler.sample.SampleHttpHandler1
- com.networknt.handler.sample.SampleHttpHandler2
- com.networknt.handler.sample.SampleHttpHandler3@third

chains:
secondBeforeFirst:
- com.networknt.handler.sample.SampleHttpHandler2
- com.networknt.handler.sample.SampleHttpHandler1

paths:
- path: '/test'
method: 'get'
exec:
- secondBeforeFirst
- third
- path: '/v2/health'
method: 'post'
exec:
- secondBeforeFirst
- third
# If there is no matched path, then it goes here first. If this is not set, then an error
# will be returned.
defaultHandlers:
- third
37 changes: 37 additions & 0 deletions openapi-validator/src/test/resources/config/handler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
enabled: true

# Configuration for the LightHttpHandler. The handler is the base class for all middleware, server and health handlers
# set the Status Object in the AUDIT_INFO, for auditing purposes
# default, if not set:false
auditOnError: true

# set the StackTrace in the AUDIT_INFO, for auditing purposes
# default, if not set:false
auditStackTrace: true

handlers:
- com.networknt.handler.sample.SampleHttpHandler1
- com.networknt.handler.sample.SampleHttpHandler2
- com.networknt.handler.sample.SampleHttpHandler3@third

chains:
secondBeforeFirst:
- com.networknt.handler.sample.SampleHttpHandler2
- com.networknt.handler.sample.SampleHttpHandler1

paths:
- path: '/test'
method: 'get'
exec:
- secondBeforeFirst
- third
- path: '/v2/health'
method: 'post'
exec:
- secondBeforeFirst
- third
# If there is no matched path, then it goes here first. If this is not set, then an error
# will be returned.
defaultHandlers:
- third

0 comments on commit a213f0f

Please sign in to comment.