web services - RAML inline application/xml example -


 responses:   200:      body:        application/xml:          example: |           <?xml version="1.0" encoding="utf-8"?>           <my_response>             <result>success</result>             <message>great</message>           </my_response>  

is valid inline application/xml body example raml endpoint definition? if not how should be?

yes is. depending on want may want specify type using xsd. example:

/jobs:   displayname: jobs   post:     description: create job     body:       text/xml:         type: |           <xs:schema attributeformdefault="unqualified"                      elementformdefault="qualified"                      xmlns:xs="http://www.w3.org/2001/xmlschema">             <xs:element name="api-request">               <xs:complextype>                 <xs:sequence>                   <xs:element type="xs:string" name="input"/>                 </xs:sequence>               </xs:complextype>             </xs:element>           </xs:schema> 

also there special keywords used xml serialization: https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/#xml-serialization-of-type-instances


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -