--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
assertEqualsIgnoreLineEnding(Json.pretty(ExampleBuilder.fromProperty(new RefProperty("User"), definitions))
Could you tell me how i could programmatically extract the RefProperty from the swagger specification?
such that i get the #definition/User and then use it to feed it to the below function?
This is a bit of code below that loops through all Parameters for an endpoint.
There should be a way to extract the $ref here and resolve it to "User"?.
I am unable to figure out how to in the object model.
None of the models map to instance of RefModel during execution for the pet example
for (Parameter param : parameterList) {
System.out.println(param.getClass());
if (param instanceof BodyParameter) {
//System.out.println("BODY PARAMETER WAS FOUND for a put operation");
BodyParameter bp = (BodyParameter) param;
Model model = bp.getSchema();
if (model instanceof RefModel) {
RefModel ref = (RefModel) model; // Never gets executed
String simpleRef = ref.getSimpleRef();
System.out.println(simpleRef);
Model concreteModel = swagger.getDefinitions().get(simpleRef);
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
On Jun 27, 2016, at 7:53 AM, Shreejit Nair <shreeji...@gmail.com> wrote:
Thanks Tony,// This is exactly what i need
assertEqualsIgnoreLineEnding(Json.pretty(ExampleBuilder.fromProperty(newRefProperty("User"), definitions))
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
assertEqualsIgnoreLineEnding(Json.pretty(ExampleBuilder.fromProperty(newRefProperty("User"), definitions))
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/R4dcZ2nvXCE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.
if (model instanceof RefModel) {
System.out.println("Model was found of type RefModel");
RefModel ref = (RefModel) model;
String simpleRef = ref.getSimpleRef();
System.out.println(simpleRef);
Model concreteModel = swagger.getDefinitions().get(simpleRef);
Object test = ExampleBuilder.fromProperty(
new io.swagger.models.properties.RefProperty(simpleRef), definitionMap);
if (test != null) {
String str = new XmlExampleSerializer().serialize((Example) test);
System.out.println(str);
}
} else if (model instanceof ArrayModel) {
ArrayModel arrayModel = (ArrayModel) model;
Property prop = arrayModel.getItems();
if (prop instanceof RefProperty) {
Object test = ExampleBuilder.fromProperty(prop, definitionMap);
if (test != null) {
String str = new XmlExampleSerializer().serialize((Example) test);
System.out.println(str);
--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/R4dcZ2nvXCE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/R4dcZ2nvXCE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/R4dcZ2nvXCE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/R4dcZ2nvXCE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.
GET
/store/order/{orderId}
Can this have some associated $ref such that I can know what value to replace the orderId with at runtime to execute against my test harness?
I do not see a way how I can replace the {orderId} on the fly dynamically without understanding the underlying schema of how things are presented?
Also, I noticed a lot of the post/put operations for the pet swagger did not have a "consumes" section documented though they had example data so I was unable to set the content Type at runtime to execute the endpoint.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/R4dcZ2nvXCE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/R4dcZ2nvXCE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.