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

Updage spring boot3, open api 3 #3863

Merged
merged 112 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
a5b9457
[SCB-2687]upgrade to spring boot 3 and j2se to jakarta
liubao68 Jun 1, 2023
39dd1ae
[SCB-2687]upgrade to open api 3: part1
liubao68 Jun 2, 2023
85caa0c
[SCB-2687]upgrade to open api 3: part2
liubao68 Jun 7, 2023
1c82f72
[SCB-2687]upgrade to open api 3: part3
liubao68 Jun 8, 2023
5ff1ebb
[SCB-2687]upgrade to open api 3: fix tests error
liubao68 Jun 13, 2023
853cf9f
[SCB-2687]upgrade to open api 3: request body processing
liubao68 Jun 13, 2023
f49f406
[SCB-2687]upgrade to open api 3: operation processing
liubao68 Jun 14, 2023
e17c004
[SCB-2687]upgrade to open api 3: pojo parameters processing
liubao68 Jun 14, 2023
7f9af93
[SCB-2687]upgrade to open api 3: invalid type features removed
liubao68 Jun 14, 2023
c15f9ba
[SCB-2687]upgrade to open api 3: open api definition processing
liubao68 Jun 14, 2023
9ded689
[SCB-2687]upgrade to open api 3: operation processing
liubao68 Jun 15, 2023
dd56ed0
[SCB-2687]upgrade to open api 3: requestbody processing
liubao68 Jun 15, 2023
8518550
[SCB-2687]upgrade to open api 3: response schema processing
liubao68 Jun 15, 2023
3db5434
[SCB-2687]upgrade to open api 3: enum serialization
liubao68 Jun 15, 2023
7d482ef
[SCB-2687]upgrade to open api 3: one pojo param and fix swagger test …
liubao68 Jun 16, 2023
2c021ae
[SCB-2687]upgrade to open api 3: part param and fix swagger test cases
liubao68 Jun 17, 2023
d69ba2d
[SCB-2687]upgrade to open api 3: request body process cast problem
liubao68 Jun 17, 2023
b65343f
[SCB-2687]upgrade to open api 3: open api definition info
liubao68 Jun 20, 2023
680da60
[SCB-2687]upgrade to open api 3: pojo request body type
liubao68 Jun 20, 2023
5b12262
[SCB-2687]upgrade to open api 3: server path change
liubao68 Jun 20, 2023
228fabc
[SCB-2687]upgrade to open api 3: remove unused code
liubao68 Jun 20, 2023
51b4398
[SCB-2687]upgrade to open api 3: fix compile problem
liubao68 Jun 20, 2023
ffc0bbc
[SCB-2687]upgrade to open api 3: fix compile problem
liubao68 Jun 21, 2023
daf3c37
[SCB-2687]upgrade to open api 3: update hibernate validator and fix c…
liubao68 Jun 21, 2023
63c06a9
[SCB-2687]upgrade to open api 3: proto highway
liubao68 Jun 25, 2023
35c66d9
[SCB-2687]upgrade to open api 3: compile problem in common rest
liubao68 Jun 25, 2023
606bcb1
[SCB-2687]upgrade to open api 3: compile problem in common access log
liubao68 Jun 25, 2023
815afce
[SCB-2687]upgrade to open api 3: compile problem in invocation-springmvc
liubao68 Jun 25, 2023
cdceb2f
[SCB-2687]upgrade to open api 3: remove all AsyncRestTemplate related…
liubao68 Jun 25, 2023
123a7d9
[SCB-2687]upgrade to open api 3: fix compile problem registy-service-…
liubao68 Jun 25, 2023
fef3832
[SCB-2687]upgrade to open api 3: fix compile problem registy-lightweight
liubao68 Jun 25, 2023
c271991
[SCB-2687]upgrade to open api 3: fix compile problem metrics-core
liubao68 Jun 25, 2023
680c6fb
[SCB-2687]upgrade to jarkata servlet api 6.0.0
liubao68 Jun 25, 2023
571e543
[SCB-2687]upgrade to open api 3: fix compile problem inspector
liubao68 Jun 25, 2023
4da8a4e
[SCB-2687]upgrade to open api 3: fix compile problem common-protobuf
liubao68 Jun 26, 2023
2390d40
[SCB-2687]upgrade to open api 3: fix compile problem transport-highway
liubao68 Jun 26, 2023
8391783
[SCB-2687]upgrade to open api 3: fix compile problem demo-pojo
liubao68 Jun 26, 2023
000425b
[SCB-2687]upgrade to open api 3: fix compile problem demo-jaxrs
liubao68 Jun 26, 2023
44b8c09
[SCB-2687]upgrade to open api 3: fix compile problem demo-springmvc
liubao68 Jun 26, 2023
1920e31
[SCB-2687]upgrade to open api 3: fix compile problem demo-edge
liubao68 Jun 26, 2023
5633290
[SCB-2687]upgrade to spring boot 3: auth-configuration laoding mechan…
liubao68 Jun 27, 2023
dc1d024
[SCB-2687]upgrade to openapi 3: fix swagger and invocation parameter …
liubao68 Jun 27, 2023
e02c24b
[SCB-2687]upgrade to openapi 3: fix pojo body parameter missing
liubao68 Jun 27, 2023
f6d45e1
[SCB-2687]upgrade to openapi 3: fix convert mgr java type change
liubao68 Jun 27, 2023
04aa51f
[SCB-2687]upgrade to openapi 3: fix swagger first test case
liubao68 Jun 28, 2023
d9a0d3d
[SCB-2687]upgrade to openapi 3: fix swagger body and parameter separa…
liubao68 Jun 28, 2023
4c6f1ad
[SCB-2687]upgrade to openapi 3: collectionFormat support change
liubao68 Jun 28, 2023
d6be4ea
[SCB-2687]upgrade to openapi 3: fix parameter/request body parameter …
liubao68 Jun 28, 2023
f447204
[SCB-2687]upgrade to openapi 3: proto-buff converter change
liubao68 Jun 28, 2023
62fa7c9
[SCB-2687]upgrade to openapi 3: fix demo-pojo startup problems
liubao68 Jun 29, 2023
f0eb775
[SCB-2687]upgrade to openapi 3: fix empty response and parameter
liubao68 Jul 3, 2023
a42730d
[SCB-2687]upgrade to openapi 3: fix demo-filter running problems and …
liubao68 Jul 3, 2023
a24a802
[SCB-2687]upgrade to openapi 3: fix spring mvc parameter name missing…
liubao68 Jul 7, 2023
f199c66
[SCB-2687]upgrade to openapi 3: requestpart annotation processing
liubao68 Jul 7, 2023
0ef1760
[SCB-2687]upgrade to openapi 3: requestpart array parameter processing
liubao68 Jul 7, 2023
6fcbb22
[SCB-2687]upgrade to openapi 3: requestpart array parameter processing
liubao68 Jul 7, 2023
7ea93f2
[SCB-2687]fix test cases fail: producer local swagger loading
liubao68 Jul 7, 2023
133cb15
[SCB-2687]fix test cases fail: spring MVC default query parameter
liubao68 Jul 10, 2023
7e0f763
[SCB-2687]fix test cases fail: @operation default request body
liubao68 Jul 10, 2023
7bec9a6
[SCB-2687]fix test cases fail: form parameters NPE
liubao68 Jul 10, 2023
0c3defd
[SCB-2687]fix test cases fail: swagger change
liubao68 Jul 10, 2023
0e8097b
[SCB-2687]fix test cases fail: apiresponse schema implementation
liubao68 Jul 10, 2023
231bb4c
[SCB-2687]fix test cases fail: consumes and produces cause schema empty
liubao68 Jul 10, 2023
34e1c55
[SCB-2687]fix test cases fail: unnecessary validation
liubao68 Jul 10, 2023
bf61abd
[SCB-2687]fix test cases fail: byte and byte[] swagger generation
liubao68 Jul 12, 2023
11c2fa3
[SCB-2687]fix test cases fail: SpringMVC @RequestParam for Form
liubao68 Jul 13, 2023
8228e31
[SCB-2687]fix test cases fail: file upload
liubao68 Jul 13, 2023
c696ef9
[SCB-2687]fix test cases fail: use RequestAttribute to express form
liubao68 Jul 14, 2023
0007288
[SCB-2687]fix test cases fail: request body implicit parameters
liubao68 Jul 17, 2023
80efff9
[SCB-2687]fix test cases fail: request body implicit parameters for h…
liubao68 Jul 17, 2023
2a2b998
[SCB-2687]fix test cases fail: date form type
liubao68 Jul 17, 2023
e31b4ef
[SCB-2687]fix test cases fail: default produces to jason
liubao68 Jul 17, 2023
d8988f2
[SCB-2687]fix test cases fail: client model resolver by x-java-class
liubao68 Jul 17, 2023
b2116b0
[SCB-2687]fix test cases fail: add TODO to consumes/produces processing
liubao68 Jul 17, 2023
b902fd2
[SCB-2687]fix test cases fail: add TODO to illegal usage for generics
liubao68 Jul 17, 2023
bbdc174
[SCB-2687]fix test cases fail: add TODO to illegal usage for generics…
liubao68 Jul 18, 2023
a0c8c51
[SCB-2687]fix test cases fail: spring mvc default values
liubao68 Jul 18, 2023
aa455fe
[SCB-2687]fix test cases fail: add TODO for producer swagger and code…
liubao68 Jul 18, 2023
b0fccb4
[SCB-2687]fix test cases fail: add TODO for 1.x compatible features
liubao68 Jul 18, 2023
cd5d9bc
[SCB-2687]fix test cases fail: fix download problem
liubao68 Jul 18, 2023
be29147
[SCB-2687]fix test cases fail: fix upload problem
liubao68 Jul 18, 2023
0861a7d
[SCB-2687]fix test cases fail: add TODO for not supply schema id
liubao68 Jul 19, 2023
19c117e
[SCB-2687]fix test cases fail: add TODO for not support producer sche…
liubao68 Jul 19, 2023
b0a11c1
[SCB-2687]fix test cases fail: add TODO for not support 1.x compatibi…
liubao68 Jul 19, 2023
009046c
[SCB-2687]fix test cases fail: not support producer local swagger.
liubao68 Jul 19, 2023
38f4245
[SCB-2687]fix test cases fail: jaxrs swagger generation
liubao68 Jul 19, 2023
a31e206
[SCB-2687]fix test cases fail: jaxrs query parameter collection format
liubao68 Jul 19, 2023
790f216
[SCB-2687]fix test cases fail: jersey upgrade, producer schema
liubao68 Jul 19, 2023
60d032c
[SCB-2687]fix test cases fail: jaxrs parameter default values
liubao68 Jul 20, 2023
90b883c
[SCB-2687]fix test cases fail: add TODO for form default values
liubao68 Jul 20, 2023
2e229ed
[SCB-2687]fix test cases fail: highway form primitive default values
liubao68 Jul 20, 2023
0ca705b
[SCB-2687]fix test cases fail: local swagger
liubao68 Jul 20, 2023
56a0542
[SCB-2687]fix test cases fail: local swagger
liubao68 Jul 20, 2023
bb3e7e3
[SCB-2687]fix test cases fail: local swagger
liubao68 Jul 20, 2023
e9f2ce8
[SCB-2687]fix test cases fail: local swagger
liubao68 Jul 20, 2023
5440cd7
[SCB-2687]fix test cases fail: swagger core ut
liubao68 Jul 20, 2023
5781dd3
[SCB-2687]fix test cases fail: swagger jaxrs ut
liubao68 Jul 20, 2023
6da6b7a
[SCB-2687]fix test cases fail: swagger springmvc ut
liubao68 Jul 20, 2023
bd7279f
[SCB-2687]fix test cases fail: swagger springmvc ut
liubao68 Jul 20, 2023
949a440
[SCB-2687]fix test cases fail: invocation core
liubao68 Jul 20, 2023
a70fef6
[SCB-2687]fix test cases fail: core
liubao68 Jul 20, 2023
953a772
[SCB-2687]fix test cases fail: common protobuf
liubao68 Jul 21, 2023
13de936
[SCB-2687]fix test cases fail: common rest
liubao68 Jul 21, 2023
5ead520
[SCB-2687]fix test cases fail: highway
liubao68 Jul 21, 2023
6a751d2
[SCB-2687]fix test cases fail: registry service center
liubao68 Jul 21, 2023
954d8b3
[SCB-2687]fix test cases fail: spring data
liubao68 Jul 21, 2023
3fd959a
[SCB-2687]fix test cases fail: inspector
liubao68 Jul 21, 2023
c0fcc46
[SCB-2687]fix checkstyle and pmd problems
liubao68 Jul 21, 2023
c021af3
[SCB-2687]fix checkstyle and rebase problems
liubao68 Jul 21, 2023
9834af3
[SCB-2687]remove gmavenplus-plugin
liubao68 Jul 21, 2023
6fff729
[SCB-2687]removed producer swagger override: fix demo error and remov…
liubao68 Jul 21, 2023
49d1889
[SCB-2687]fix checkstyle
liubao68 Jul 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.servicecomb.core.definition.SchemaMeta;
import org.apache.servicecomb.core.event.InvocationFinishEvent;
import org.apache.servicecomb.core.event.ServerAccessLogEvent;
import org.apache.servicecomb.swagger.SwaggerUtils;

import io.vertx.core.http.HttpServerRequest;
import io.vertx.ext.web.RoutingContext;
Expand All @@ -49,7 +50,7 @@ public void appendClientFormattedItem(InvocationFinishEvent finishEvent, StringB
OperationMeta operationMeta = finishEvent.getInvocation().getOperationMeta();
SchemaMeta schemaMeta = finishEvent.getInvocation().getSchemaMeta();
if (operationMeta != null && schemaMeta != null && schemaMeta.getSwagger() != null) {
builder.append(schemaMeta.getSwagger().getBasePath()).append(operationMeta.getOperationPath());
builder.append(SwaggerUtils.getBasePath(schemaMeta.getSwagger())).append(operationMeta.getOperationPath());
return;
}
RestClientRequestImpl restRequestImpl = (RestClientRequestImpl) finishEvent.getInvocation().getHandlerContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import static org.mockito.Mockito.when;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -34,7 +35,8 @@
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

import io.swagger.models.Swagger;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.servers.Server;
import io.vertx.core.http.HttpClientRequest;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.ext.web.RoutingContext;
Expand All @@ -58,7 +60,7 @@ public class UrlPathItemTest {

private SchemaMeta schemaMeta;

private Swagger swagger;
private OpenAPI swagger;

private RestClientRequestImpl restClientRequest;

Expand All @@ -73,7 +75,7 @@ public void initStrBuilder() {
serverRequest = Mockito.mock(HttpServerRequest.class);
operationMeta = Mockito.mock(OperationMeta.class);
schemaMeta = Mockito.mock(SchemaMeta.class);
swagger = Mockito.mock(Swagger.class);
swagger = Mockito.mock(OpenAPI.class);
restClientRequest = Mockito.mock(RestClientRequestImpl.class);
clientRequest = Mockito.mock(HttpClientRequest.class);

Expand All @@ -88,7 +90,9 @@ public void clientFormattedElement() {
when(invocation.getOperationMeta()).thenReturn(operationMeta);
when(invocation.getSchemaMeta()).thenReturn(schemaMeta);
when(schemaMeta.getSwagger()).thenReturn(swagger);
when(swagger.getBasePath()).thenReturn("/base");
Server server = Mockito.mock(Server.class);
when(server.getUrl()).thenReturn("/base");
when(swagger.getServers()).thenReturn(Arrays.asList(server));
when(operationMeta.getOperationPath()).thenReturn("/test");

ITEM.appendClientFormattedItem(finishEvent, strBuilder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
import java.util.Map;
import java.util.Map.Entry;

import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.Response.Status.Family;

import org.apache.servicecomb.codec.protobuf.utils.ScopedProtobufSchemaManager;
import org.apache.servicecomb.core.Invocation;
import org.apache.servicecomb.foundation.protobuf.ProtoMapper;
Expand All @@ -33,6 +30,8 @@
import com.fasterxml.jackson.databind.JavaType;

import io.protostuff.compiler.model.Message;
import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.core.Response.Status.Family;

@SuppressWarnings("rawtypes")
public class OperationProtobuf {
Expand Down Expand Up @@ -101,10 +100,10 @@ private void initConsumerRequestCodec(Invocation invocation, Message requestMess
requestRootSerializer = new RequestRootSerializer(
mapper.createRootSerializer(requestMessage, Object.class), true, false);
} else {
if (invocation.getOperationMeta().getSwaggerOperation().getParameters().isEmpty()) {
if (invocation.getOperationMeta().parameterCount() == 0) {
requestRootSerializer = new RequestRootSerializer(mapper.createRootSerializer(requestMessage, Object.class),
false, false);
} else if (invocation.getOperationMeta().getSwaggerOperation().getParameters().size() == 1) {
} else if (invocation.getOperationMeta().parameterCount() == 1) {
requestRootSerializer = new RequestRootSerializer(mapper.createRootSerializer(requestMessage,
Object.class), false, true);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.Map;
import java.util.Objects;

import javax.ws.rs.core.Response.Status;
import jakarta.ws.rs.core.Response.Status;

import org.apache.servicecomb.codec.protobuf.utils.ScopedProtobufSchemaManager;
import org.apache.servicecomb.core.Invocation;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading