Re: Server validation of body schemas

2016-09-15 Thread Max Goldstein
I'll give that option a shot and report back.

I'm already set up with the node swagger parser 
 so inlining 
references is not a problem.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Server validation of body schemas

2016-09-15 Thread tony tam
Well swagger-inflector does validate payloads with the options here:

https://github.com/swagger-api/swagger-inflector#payload-validation 


However, you can “borrow” the logic that validates payloads and do your own 
logic.  The hardest part is to “resolve fully” the spec (that means in-lining 
references) before using any schema validator.

> On Sep 15, 2016, at 7:54 PM, Max Goldstein  wrote:
> 
> I want my server (written in Java) to validate that the bodies of incoming 
> POST and PUT requests matches the Schema Object for that operation's body 
> parameter defined in my Swagger spec. I'd also like to validate that outgoing 
> response bodies conform to the schema defined in the response object.
> 
> I'm aware of swagger-inflector but it doesn't seem particularly 
> well-maintained. It validates query parameters (and presumably URL ones as 
> well) but it doesn't validate the body, at least in my testing. Some of my 
> other concerns is that it doesn't appear to validate the multipleOf property 
> (source 
> )
>  or enforce the discriminator property.
> 
> My current best idea is to use the JSON Schema validator 
>  (27 hundred commits) 
> and follow up with custom code to validate the discriminator and readOnly 
> properties (which Swagger adds to JSON Schema). Is there a better library 
> that I'm unaware of? Is there some other solution that I should know about?
> 
> -- 
> 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+unsubscr...@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-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Server validation of body schemas

2016-09-15 Thread Max Goldstein
I want my server (written in Java) to validate that the bodies of incoming 
POST and PUT requests matches the Schema Object for that operation's body 
parameter defined in my Swagger spec. I'd also like to validate that 
outgoing response bodies conform to the schema defined in the response 
object.

I'm aware of swagger-inflector but it doesn't seem particularly 
well-maintained. It validates query parameters (and presumably URL ones as 
well) but it doesn't validate the body, at least in my testing. Some of my 
other concerns is that it doesn't appear to validate the multipleOf 
property (source 
)
 
or enforce the discriminator property.

My current best idea is to use the JSON Schema validator 
 (27 hundred commits) 
and follow up with custom code to validate the discriminator and readOnly 
properties (which Swagger adds to JSON Schema). Is there a better library 
that I'm unaware of? Is there some other solution that I should know about?

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Support for Batching

2016-09-15 Thread Vimal Suba
hello experts: we are exploring the use of API batching for our REST API 
framework. We are using swagger for our existing capabilities and love it. 
Any suggestions or best practices of using batching along with Swagger? In 
other words, how do we achieve documentation automation with batching?

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.