Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added support for an endpoint content-type for all services. possible…
… values are json, xml. the purpose is so that we can respond with either XML or JSON as appropriate when we detect a policy failure
- Loading branch information
1 parent
fd56922
commit 0c57589
Showing
32 changed files
with
389 additions
and
37 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
32 changes: 32 additions & 0 deletions
32
gateway/test/src/test/java/io/apiman/gateway/test/Policy_IgnoredResourcesXmlTest.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,32 @@ | ||
/* | ||
* Copyright 2014 JBoss Inc | ||
* | ||
* 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. | ||
*/ | ||
package io.apiman.gateway.test; | ||
|
||
import io.apiman.gateway.test.junit.GatewayRestTestPlan; | ||
import io.apiman.gateway.test.junit.GatewayRestTester; | ||
|
||
import org.junit.runner.RunWith; | ||
|
||
/** | ||
* Make sure the Ignored Resources policy works. | ||
* | ||
* @author rubenrm1@gmail.com | ||
*/ | ||
@RunWith(GatewayRestTester.class) | ||
@GatewayRestTestPlan("test-plans/policies/ignored-resources-xml-testPlan.xml") | ||
public class Policy_IgnoredResourcesXmlTest { | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
...test/resources/test-plan-data/policies/ignored-resources-xml/001-publish-service.resttest
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,13 @@ | ||
PUT /services admin/admin | ||
Content-Type: application/json | ||
|
||
{ | ||
"organizationId" : "Policy_IgnoredResourcesXmlTest", | ||
"serviceId" : "echo", | ||
"version" : "1.0.0", | ||
"endpointType" : "rest", | ||
"endpointContentType" : "xml", | ||
"endpoint" : "${apiman-gateway-test.endpoints.echo}/" | ||
} | ||
---- | ||
204 |
Oops, something went wrong.