forked from apache/polaris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiService.mustache
62 lines (55 loc) · 2.58 KB
/
apiService.mustache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 {{package}};
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}
{{#imports}}import {{import}};
{{/imports}}
import java.util.List;
import java.io.InputStream;
{{#useBeanValidation}}
import {{javaxPackage}}.validation.constraints.*;
import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
import {{javaxPackage}}.ws.rs.core.Response;
import {{javaxPackage}}.ws.rs.core.SecurityContext;
import org.apache.polaris.core.context.RealmContext;
{{!
Note that this template is copied from https://github.com/OpenAPITools/openapi-generator/blob/783e68c7acbbdcbb2282d167d1644b069f12d486/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiService.mustache
It is here to remove some unsupported imports and to update the default implementation to return a
501 response code
}}
/**
* Service interface for implementations of the {{classname}}Service. Provides default
* implemntations for all service methods that return 501 error codes (not implemented).
*
* This file is automatically generated by the OpenAPI Code Generator based on configuration in the
* pom.xml file in the module.
*
*/
{{>generatedAnnotation}}
{{#operations}}
public interface {{classname}}Service {
{{#operation}}
default Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{^isMultipart}}{{>serviceFormParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}RealmContext realmContext,SecurityContext securityContext) {
return Response.status(501).build(); // not implemented
}
{{/operation}}
}
{{/operations}}