OK, I think I will answer my own question. It seems there is no way to 
"include" externally defined data representations and certainly no support 
for defining externally defined XSDs. see:


I find this surprising. Most SOA/API representations for intra-enterprise 
integration use XML. I appreciate that implementing tooling that 
autogenerated XML stubs is considerable work, but there should have been 
some basic mechanism from the outset that allowed an "include" of any type 
even if this mean't it wasn't auto-generated.

I think the solution is to go with RAML even though it seems it is 
deprecated and now subsumed and replaced with the OAS project.

Please let me know if I am mistaken in anyway.


On Thursday, August 10, 2017 at 10:52:43 AM UTC+1, novice drummer wrote:
> Hi,
> I have been using Swagger a day now, and am still learning, but despite 
> much Googling I have a problem which I cannot solve.
> I want to define some RESTful APIs which utilise some moderately complex 
> data models expressed in XML Schema. Some constraints/facts:
> 1) Use Swagger 2.0
> 2) Define the Schema external to the Swagger YAML file. I don't want to 
> describe data models inline - regardless of whether it is JSON or XSD.
> 3) XSD schema validation or code generation are NOT requirements.
> 4) For request and response body elements XML Schema must be supported 
> from the start. JSON may be supported later.
> Essentially I just want to describe a RESTful contract such that 
> development teams know that the body should adhere to 
> http://mycompany.com/crm/person.xsd and the response should be 
> http://mycompany.com/crm/person.xsd or 
> http://mycompany.com/common/fault.xsd
> Can someone please point me toward the best approach to this?
> Ben.

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.

Reply via email to