Skip to content

baseUri property to replace RAML's base URI #535

@jarrodek

Description

@jarrodek

There's a lot of questions around this and few use cases to support in the console.

Currently setting the baseUri property on the API console affects the URL editor by providing it with additional information how to treat relative URLs in RAML. This should have wider support in the console.

In cases where the console can be used in different environments at the same time (for example changing base domain between staging, development and production) currently you have to build 3 different consoles for 3 APIs with corresponding base URIs. This is unnecessary and the console should be configurable to support this.

This ticket is to change behavior of the baseUri configuration property of the console.

New behavior

When the baseUri changes to any value (it will not check for valid of absolute URIs) the console passes the information to request editor. Request editor computes new URL value for url and url parameters editors. Both editors will accept new value and treat it the information it came from RAML. Any updates to the url in the URL editor or in the URL parameters editor will result with the URL with new base URI.
If previous base URI contained variables the variables won't be applied to the URL (will be ignored).

When the baseUri property is cleared (empty, false, undefined, null) then the URL will be computed as it should be from the RAML definition.

This is scheduled for the beginning of next week. However comments are welcome.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions