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

Malformed request with string exemples #558

Open
pbonderff opened this issue Feb 26, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@pbonderff
Copy link

commented Feb 26, 2018

In V3 api-console, when submitting a request with the try it form filled with string exemples values , a carriage return (%0A) a added after each parameter making this parameter incorrect. This is not the case for numeric values.
Exemple : https://hostname/v1/Adresse?fields=IdAdresse%2CDenomination%2CVille%0A&order=Denomination%2CVille%0A&desc=Ville%0A&limit=5&offset=10

My raml snippets :

selectFields.yaml file : 
#!RAML traits
queryParameters:
  fields:
    type: string
    required: false
    example: |
      <<exemple>>

orderable.yaml file :
#!RAML traits
queryParameters:
  order:
    type: string
    required: false
    example: |
      <<exempleOrder>>
  desc:
    description: |
      Liste des champs à trier dans l'ordre descendant.
    type: string
    required: false
    example: |
      <<exempleDesc>>

pageable.yaml file :
#!RAML traits
queryParameters:
  limit:
    type: integer
    example: 5
    required: false
  offset:
    type: integer
    example: 0
    required: false

api.raml (snippet) file :
/Adresse:
  type: liste
  get:
    is: [
    selectFields: {exemple : "IdAdresse,Denomination,Ville"},
    orderable: {exempleOrder: "Denomination,Ville", exempleDesc: "Ville"},
    pageable: {}
    ]

Steps to reproduce

  1. Load a raml project in api-console
  2. Select a method with multiple parameters with sting exemples
  3. In the request section, you should see unwanted carriage return

Expected outcome

Api-console shouldn't add CR after string parameter values

Was this working before?

No, it was already broken

Affected browsers

Reproduced on Osx 10.13.3 with Safari 11.0.3, Firefox 58.0.2 (64 bits) and Chrome 64.0.3282.167 (Build officiel) (64 bits)

@jarrodek jarrodek added the v3 label Feb 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.