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

FISH-663 MicroProfile OpenAPI 2.0 (MP 4.0) #5065

Merged
merged 30 commits into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bdf639f
FISH-663 OpenAPI 2.0-RC3 Upgrade
MattGill98 Nov 23, 2020
10862a0
FISH-660 Order all HashMaps
MattGill98 Nov 23, 2020
40726ad
FISH-663 Remove Empty 'content' instances from response
MattGill98 Nov 23, 2020
e4b28d7
FISH-663 Fix Runtime Exceptions
MattGill98 Nov 24, 2020
0d30854
FISH-663 Merge Schema classes correctly
MattGill98 Nov 26, 2020
1673ec6
FISH-663 Make OpenAPI Collection Types Immutable
MattGill98 Nov 26, 2020
7976a07
FISH-663 Fix OpenAPI Collection set methods
MattGill98 Nov 26, 2020
99f6561
FISH-663 Add detail to OpenAPI test failures
MattGill98 Nov 27, 2020
71930fe
FISH-663 Prevent types being added to references
MattGill98 Nov 27, 2020
2b99fab
FISH-663 Fix Collection methods
MattGill98 Nov 27, 2020
982c41e
FISH-663 Refactor OpenApiConfiguration
MattGill98 Nov 30, 2020
4a82059
FISH-663 Add Config Property Schema Processing
MattGill98 Dec 2, 2020
f248f13
FISH-663 Simplify extractAnnotations Methods
MattGill98 Dec 9, 2020
b2c358f
FISH-663 Parse Exception Mappers
MattGill98 Dec 9, 2020
63753d6
FISH-663 Remove Unused 'Contents' variables
MattGill98 Dec 11, 2020
e060d3b
FISH-663 Fix OpenAPI @Parameters parsing
MattGill98 Dec 11, 2020
e22efc6
FISH-663 Fix OpenAPI Callback Schema Creation
MattGill98 Dec 11, 2020
c48528b
FISH-663 Fix OpenAPI format parameter
MattGill98 Dec 11, 2020
257f338
Merge branch 'master' of https://github.com/payara/Payara into FISH-663
MattGill98 Dec 16, 2020
01567d7
FISH-663 MP OpenAPI 2.0 @APIResponseSchema support
MattGill98 Dec 18, 2020
fca79ae
FISH-663 MP OpenAPI add required properties
MattGill98 Dec 18, 2020
936002c
FISH-663 MP OpenAPI use method schema annotations
MattGill98 Dec 18, 2020
c96f44c
FISH-663 MP OpenAPI 2.0 @RequestBodySchema support
MattGill98 Dec 21, 2020
cb78882
FISH-760 Fix OpenAPI Enum parsing
MattGill98 Dec 21, 2020
7fc5a19
Merge branch 'master' of https://github.com/payara/Payara into FISH-663
MattGill98 Dec 22, 2020
6a610a8
FISH-663 HK2 2.6.1.payara-p5 upgrade
MattGill98 Dec 22, 2020
e663b37
FISH-663 OpenAPI remove numeric path syntax from tests
MattGill98 Dec 22, 2020
a452e20
FISH-663 OpenAPI Fix exception mapping order
MattGill98 Dec 22, 2020
f8daa58
FISH-663 OpenAPI minor PR fixes
MattGill98 Dec 22, 2020
76ca36e
FISH-663 MP OpenAPI separate create and merge phases
MattGill98 Dec 22, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@
package fish.payara.microprofile.openapi.api.visitor;

import fish.payara.microprofile.openapi.impl.visitor.AnnotationInfo;

import java.util.Map;

import org.eclipse.microprofile.openapi.models.OpenAPI;
import org.eclipse.microprofile.openapi.models.Operation;
import org.eclipse.microprofile.openapi.models.responses.APIResponse;
import org.glassfish.hk2.classmodel.reflect.ExtensibleType;
import org.glassfish.hk2.classmodel.reflect.Type;

Expand All @@ -68,6 +72,10 @@ public interface ApiContext {
*/
Operation getWorkingOperation();

void addMappedExceptionResponse(String exceptionType, APIResponse exceptionResponse);

Map<String, APIResponse> getMappedExceptionResponses();

/**
* @param type any class, not null
* @return true, if the give type is a known type in this context, else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ interface VisitorFunction<AnnotationModel, E extends AnnotatedElement> {
void apply(AnnotationModel annotation, E element, ApiContext context);
}

// JAX-RS annotations
// JAX-RS method types

void visitGET(AnnotationModel get, MethodModel element, ApiContext context);

Expand All @@ -69,10 +69,14 @@ interface VisitorFunction<AnnotationModel, E extends AnnotatedElement> {

void visitPATCH(AnnotationModel patch, MethodModel element, ApiContext context);

// JAX-RS data types

void visitProduces(AnnotationModel produces, AnnotatedElement element, ApiContext context);

void visitConsumes(AnnotationModel produces, AnnotatedElement element, ApiContext context);

// JAX-RS parameter types

void visitQueryParam(AnnotationModel param, AnnotatedElement element, ApiContext context);

void visitPathParam(AnnotationModel param, AnnotatedElement element, ApiContext context);
Expand Down Expand Up @@ -101,10 +105,14 @@ interface VisitorFunction<AnnotationModel, E extends AnnotatedElement> {

void visitRequestBody(AnnotationModel requestBody, AnnotatedElement element, ApiContext context);

void visitRequestBodySchema(AnnotationModel requestBodySchema, AnnotatedElement element, ApiContext context);

void visitAPIResponse(AnnotationModel apiResponse, AnnotatedElement element, ApiContext context);

void visitAPIResponses(AnnotationModel apiResponses, AnnotatedElement element, ApiContext context);

void visitAPIResponseSchema(AnnotationModel apiResponseSchema, AnnotatedElement element, ApiContext context);

void visitParameter(AnnotationModel parameter, AnnotatedElement element, ApiContext context);

void visitParameters(AnnotationModel parameters, AnnotatedElement element, ApiContext context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import fish.payara.microprofile.openapi.impl.model.OpenAPIImpl;
import fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor;
import fish.payara.microprofile.openapi.impl.processor.BaseProcessor;
import fish.payara.microprofile.openapi.impl.processor.ConfigPropertyProcessor;
import fish.payara.microprofile.openapi.impl.processor.FileProcessor;
import fish.payara.microprofile.openapi.impl.processor.FilterProcessor;
import fish.payara.microprofile.openapi.impl.processor.ModelReaderProcessor;
Expand Down Expand Up @@ -127,6 +128,7 @@ public synchronized OpenAPI get() {
OpenAPI doc = new OpenAPIImpl();
try {
final List<URL> baseURLs = getServerURL(contextRoot);
doc = new ConfigPropertyProcessor().process(doc, config);
doc = new ModelReaderProcessor().process(doc, config);
doc = new FileProcessor(classLoader).process(doc, config);
doc = new ApplicationProcessor(
Expand Down
Loading