Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schemas missing in generated RAML #3

Open
avinashpaul opened this issue May 20, 2015 · 3 comments
Open

Schemas missing in generated RAML #3

avinashpaul opened this issue May 20, 2015 · 3 comments

Comments

@avinashpaul
Copy link

Hi @KonstantinSviridov ,
I try out this project. It does a great job of converting WADL to RAML , It is missing a common feature , the below WADL request element

<request>
<representation xmlns:cns="http://www.example.org" mediaType="application/xml" element="cns:Customer" />
</request>

is mapped in raml as below

body: 
      application/xml: 
        schema: Customer

But the Schemas section does not have any reference to Customer , the below part is missing from generated RAML file

schemas:
  - Customer:      !include path-to-schemas/file.xsd or "the xsd itself"
@KonstantinSviridov
Copy link
Owner

Hi, @avinashpaul.
Sorry for late response. We had a lot to do for the "Connect" conference.

Right now we do not support such manner of including chemes. We support only standard. According to it, the element attribute must contain "qualified name of the root element as described within the grammars section".

So, could you, please tell more about the syntax you use. Is it a common practice?

Regards, Konstantin

@avinashpaul
Copy link
Author

@KonstantinSviridov thank you for the reply , so you mean to say only the below case is handled

 <grammars>
      <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <element name="Customer">
            <complexType>
               <sequence>
                  <element name="id" type="string" />
               </sequence>
            </complexType>
         </element>
 </grammars>
    ....
    ....
    ....
<representation  mediaType="application/xml" element="Customer" />

@KonstantinSviridov
Copy link
Owner

I would say, it would work like this:

<grammars> 
    <include href="http://www.example.com/Schema_where_Customer_element_is_defined.xsd"/>
</grammars>
<representation  mediaType="application/xml" element="Customer" />

The resulting schema will be just the same as Schema_where_Customer_element_is_defined.xsd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants