-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TAP5-2696: fixing TapestryHttpModule import Bumping version to 5.8.0 due to major improvement added (REST) TAP5-2696: OpenAPI viewer, OpenAPI definition dispatcher plus a few JavaDoc fixes TAP5-2696: generating OpenAPI for path and query parameters TAP5-2696: adding missing commons-io dependency to tapestry-http TAP5-2696: some REST code adjustments TAP5-2696: fixing NPE in OpenAPI generation when a superclass has no REST event handler methods TAP5-2696: adding @ActivactionContextParameter TAP5-2696: caching in OpenAPI dispatcher when production mode is on TAP5-2696: moving some classes to RESt-specific packages TAP5-2696: removing OpenAPI description validation and .map assets TAP5-2696: bunch of changes. Added MappedEntitiesService Added OpenAPI base path configuration symbol Added @RestInfo with information about produced and consumed MIME types to OpenAPI description, plus the expected return type of event handler methods Added OpenApiTypeDescriber Added HttpStatus to be a more generic version of HttpError TAP5-2696: fixing misplaced code in tapestry-openapi-viewer TAP5-2696: better HttpStatus and OpenAPI viewer styling TAP5-2696: changing the root tapestry-openapi-viewer package TAP5-2696: adding tapestry-rest-jackson TAP5-2696: adding some methods to HttpStatus TAP5-2696: generating descriptions of request bodies, plus some fixes TAP5-2696: fixing JSON mime type in test code TAP5-2696: fixing JavaDoc and JSON content type TAP5-2696: fixing more JavaDoc TAP5-2696: fixing MiscTests.static_activation_context_value TAP5-2696: fixing compilation error
- Loading branch information
Showing
92 changed files
with
5,435 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ gradle-app.setting | |
*~ | ||
\#* | ||
/.metadata/ | ||
docs/* | ||
docs/ |
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
36 changes: 36 additions & 0 deletions
36
commons/src/main/java/org/apache/tapestry5/commons/util/CoercionFailedException.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,36 @@ | ||
// Copyright 2021 The Apache Software Foundation | ||
// | ||
// 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 org.apache.tapestry5.commons.util; | ||
|
||
import org.apache.tapestry5.commons.internal.util.TapestryException; | ||
import org.apache.tapestry5.commons.services.Coercion; | ||
|
||
/** | ||
* Exception used when a {@link Coercion} throws an exception while | ||
* trying to coerce a value. | ||
* | ||
* @since 5.8.0 | ||
*/ | ||
public class CoercionFailedException extends TapestryException | ||
{ | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public CoercionFailedException(String message, Throwable cause) | ||
{ | ||
super(message, cause); | ||
} | ||
|
||
} |
55 changes: 55 additions & 0 deletions
55
commons/src/main/java/org/apache/tapestry5/commons/util/CoercionNotFoundException.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,55 @@ | ||
// Copyright 2021 The Apache Software Foundation | ||
// | ||
// 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 org.apache.tapestry5.commons.util; | ||
|
||
import org.apache.tapestry5.commons.services.TypeCoercer; | ||
|
||
/** | ||
* Exception used when {@link TypeCoercer} doesn't find a coercion from a type to another. | ||
* | ||
* @since 5.8.0 | ||
*/ | ||
public class CoercionNotFoundException extends UnknownValueException | ||
{ | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
final private Class<?> sourceType; | ||
|
||
final private Class<?> targetType; | ||
|
||
public CoercionNotFoundException(String message, AvailableValues availableValues, Class<?> sourceType, Class<?> targetType) | ||
{ | ||
super(message, availableValues); | ||
this.sourceType = sourceType; | ||
this.targetType = targetType; | ||
} | ||
|
||
/** | ||
* Returns the source type. | ||
*/ | ||
public Class<?> getSourceType() { | ||
return sourceType; | ||
} | ||
|
||
|
||
/** | ||
* Returns the target type. | ||
*/ | ||
public Class<?> getTargetType() { | ||
return targetType; | ||
} | ||
|
||
} |
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
46 changes: 46 additions & 0 deletions
46
tapestry-core/src/main/java/org/apache/tapestry5/annotations/ActivationContextParameter.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,46 @@ | ||
// 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 org.apache.tapestry5.annotations; | ||
|
||
import static java.lang.annotation.ElementType.PARAMETER; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
import static org.apache.tapestry5.ioc.annotations.AnnotationUseContext.PAGE; | ||
import static org.apache.tapestry5.ioc.annotations.AnnotationUseContext.COMPONENT; | ||
import static org.apache.tapestry5.ioc.annotations.AnnotationUseContext.MIXIN; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import org.apache.tapestry5.ioc.annotations.UseWith; | ||
|
||
/** | ||
* Annotation that may be placed on parameters of event handler methods to define their names | ||
* in OpenAPI description. This is <em>not</em> needed for an event handler parameter to be | ||
* a parameter in a REST endpoint event handler method. | ||
* | ||
* @since 5.8.0 | ||
*/ | ||
@Target( | ||
{ PARAMETER }) | ||
@Retention(RUNTIME) | ||
@Documented | ||
@UseWith( | ||
{ PAGE, COMPONENT, MIXIN }) | ||
public @interface ActivationContextParameter | ||
{ | ||
/** | ||
* The name to be used for this parameter in the OpenAPI description. | ||
*/ | ||
String value(); | ||
} |
Oops, something went wrong.