How to generate spec for new apigee edge beta version?

I tried to generate spec file from specgen. While uploading that generated file, I got errors in apigee edge. give me suggestion as soon as possible

Solved Solved
0 7 300
1 ACCEPTED SOLUTION

Thanks for the details. It would have been better if you copy-pasted your Swagger.

You need to add a schema to your body parameter,

Sample schema,

 "parameters": [
          {
            "in": "query",
            "name": "query",
            "type":"string",
            "description": "some-descc",
            "required": true
          },
          {
            "name": "body",
            "in":"body",
            "description": "some-desc",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "param1": {
                  "type": "string"
                },
                "param2": {
                  "type": "string"
                }
              }
            }
          }
        ]

View solution in original post

7 REPLIES 7

@sravani Ganapam, please be more specific,

what file did you use?

what error are you facing?

provide details on what you are trying to do.

I have generated Spec file for the following Proxy URL and my input data is XML format.

API Proxy URL:

https://sravanig231-eval-test.apigee.net/createorder?apikey=Ee0zaerJzC99Mq14rWWk10HbxhXZWUuB

request body:

<Order> <Date>2003/07/04</Date> <CustomerId>284</CustomerId> <CustomerName>Acme Alpha</CustomerName> <Item> <ItemId>954</ItemId> <ItemName>Coupler</ItemName> <Quantity>5</Quantity> </Item> <Item> <ItemId>654</ItemId> <ItemName>Connector</ItemName> <Quantity>3</Quantity> </Item> <Item> <ItemId>579</ItemId> <ItemName>Clasp</ItemName> <Quantity>1</Quantity> </Item> </Order>

I am attaching spec file please verify once and give me suggesscreenshot-36.pngtions

Thanks for the details. It would have been better if you copy-pasted your Swagger.

You need to add a schema to your body parameter,

Sample schema,

 "parameters": [
          {
            "in": "query",
            "name": "query",
            "type":"string",
            "description": "some-descc",
            "required": true
          },
          {
            "name": "body",
            "in":"body",
            "description": "some-desc",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "param1": {
                  "type": "string"
                },
                "param2": {
                  "type": "string"
                }
              }
            }
          }
        ]

Thank you for your response.

I tried to upload the spec in the format of json. while uploading the spec , it allows only yaml format. It does not support the json format of spec.

Can you share the message you received when uploading the spec via Json (were you uploading a file, importing a URL, or using the editor)? I believe if you are entering json directly into the spec editor and it asks you if you want to convert it to YAML, you can answer "cancel" to that dialog and it will keep it as json format. File upload and URL import both support json format file types as well.

Thanks

-Sean