oasis-open / odata-rapid

Rapid - Specification, tools and libraries to support the development and adoption of simple REST-based APIs.
https://rapid.rocks
Apache License 2.0
17 stars 8 forks source link

urlEditor not tolerant of insignificant whitespace #420

Closed mikepizzo closed 1 year ago

mikepizzo commented 2 years ago

go to htts://rapid.rocks/api-explorer

In the url editbox 1) enter company? 2) enter a newline (you'll have to play around a bit to dismiss the suggestions) 3) type $expand=

expected result: suggests employees actual result: suggests query options

If you do the same thing without entering the newline after company?, then employees is suggested as expected.

mikepizzo commented 2 years ago

Fix is to update uri-editor.ts, linie 25 from: const content = context.state.doc.line(1).text; to: const content = getDocContent(context.state.doc);

I have addressed this as part of a separate set of fixes in the urlFormatter branch.

also need to update linterSource on line 51.