API documantation on Postman

Good Afternoon,

I'm working on a API documentation that wil be interactive, it's based on a BS class on Ensemble.

The objective on making the documentation is simplify the undestanding of the operation for those who are not acquainted with the Ensemble environment.

My problem is, when using Postman to test a operation the indentation appears as such:

{
    "authKey": "<string>",
    "authKeyType": "<string>",
    "birthDate": "<string>",
    "name": "<string>",
    "nameMother": "<string>",
    "zipCode": "<string>",
    "phone": "<string>",
    "token": "<string>",
    "senhaOrigem": "<string>",
    "origem": "<string>"
}

Wich produce the following error:

<BODY>
    <error>
        <source>Class.Name.BS.Example.yyy.xxx</source>
        <text>ERROR #6301: SAX XML Parser Error: invalid character 0x1 while processing Anonymous Stream at line 3 offset 120</text>
    </error>
</BODY>

The documentation works ok when the request is send in this format:

{"authKey": "<string>", "authKeyType": "<string>",  "birthDate": "<string>", "name": "<string>", "nameMother": "<string>",  "zipCode": "<string>",  "phone": "<string>",  "token": "<string>",  "senhaOrigem": "<string>", "origem": "<string>"}

My question is how can I configure the documentation in a way that it doesn't require the change in indentation to be manually made?

 

Ps: English is not my first language but i tried my best to write it correctly, I apologize for possible mistakes that may have been made.

  • 0
  • 0
  • 127
  • 3
  • 1

Answers

Is it service or operation? Please elaborate on your configuration.

Because you have XML error, I think there are some additional transformation(s) taking place.

Have you tried checking Stream at line 3 offset 120?

It's a service, and the problem were a lack of compatibility on the transformation. 

Now solved, thanks.

Comments

Hi @Victor Ferreira!

It's not an answer to your question but just a notice that we also have a Spanish community too. So you are able to click on ES switcher(right top corner of the question) of your question and you'll be able to introduce the linked question in Spanish too.

It happens that I'm Brazilian and so my first language is portuguese, because of that I rather use the english community. 

But thanks for the heads up anyway.