You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the output. Note that cats in GetCatsResponse is not repeated.
syntax="proto3";
packagearrayresponse;
import"google/protobuf/empty.proto";
messageCat {
stringcolor=1;
stringname=2;
}
messageGetCatsResponse {
Catcats=1; // Notice that cats is not repeated - but it should be
}
serviceArrayResponseService {
// Get All CatsrpcGetCats(google.protobuf.Empty) returns (GetCatsResponse) {}
}
If I make a small adjustment to the api.yaml by inlining the array $ref, like this:
syntax="proto3";
packagearrayresponse;
import"google/protobuf/empty.proto";
messageCat {
stringcolor=1;
stringname=2;
}
messageGetCatsResponse {
repeatedCatcats=1; // cats is now repeated
}
serviceArrayResponseService {
// Get All CatsrpcGetCats(google.protobuf.Empty) returns (GetCatsResponse) {}
}
Why is this happening? Swagger is interpreting it correctly in swagger UI. It seems like the $ref should produce the repeated type, just like the inline version.
The text was updated successfully, but these errors were encountered:
I am using a $ref to an array type in my swagger. It's not generating a repeated type. It only generates the repeated type if I inline the array $ref.
Here's an example.
Here is the output. Note that
cats
inGetCatsResponse
is not repeated.If I make a small adjustment to the api.yaml by inlining the array $ref, like this:
Now,
cats
is repeated inGetCatsResponse
.Why is this happening? Swagger is interpreting it correctly in swagger UI. It seems like the $ref should produce the repeated type, just like the inline version.
The text was updated successfully, but these errors were encountered: