Skip to content

Releases: mulesoft/api-console

OAS 3 support

28 Apr 05:00
0ffcc85
Compare
Choose a tag to compare

This release adds OAS 3 support to API Console.
The changes are backward compatible. This means that this release only adds functionality to the existing API console without changing or removing existing. The exception is the authorization data attached to the request object but because API Console handles request internally and applies auth data to request object this is not a breaking change. If you read the auth property of the request object then your application may break as now it returns an array to support multi authorization in OAS.

Support for multi-server definitions

This brings a number of changes to how the console processes base URI and server definition:

  • Server is selected automatically to the first server on the list, unless selection is already made.
    The server selector attributes are:
    • baseUri (string): overrides any server definition value
    • allowCustomBaseUri (boolean): When true a custom URI can be provided by the user
    • servers (array): Array of servers to be rendered
    • serverType (string): Currently selected base URI type. (‘server’ when provided in the amf model, ‘uri’ if provided through the custom-base-uri slot and custom if custom URI option is selected)
    • serverValue (string): Current value of the server selector
  • The server selector is rendered:
    • By default in the request editor in full view
    • In the documentation view when the console is rendered in the narrow view and the current view is the documentation
    • In both cases the selector is not rendered when there is less than 2 options to render
  • The api-summary screen now renders a list of base URIs from each server definition. It renders a single base URI (as before) if there’s only one server.

Custom servers

In addition to the server selector now developers can insert a list items as child nodes of the console that will be rendered in the selector. In this case the selector is always rendered.

To the server selector with custom items in it add anypoint-items (or other list items) as children to api-server-selector, api-console, api-documentation or api-request-panel components.

Each anypoint-item must:

  • Have the “slot” attribute set to “custom-base-uri”
  • Have the “value” attribute with the base URI value to add

Example:

<api console>
  <anypoint-item slot=”custom-base-uri” value=”https://base1.com”>Base 1</anypoint-item>
  <anypoint-item slot=”custom-base-uri” value=”https://base2.com”>Base 2</anypoint-item>
</api-console>

New authorization methods

The authorization panel for the request editor was redesigned and rebuilt from scratch to enable OAS’ multi-authorization feature. An OAS API can define a number of authorization definitions that can be applied to the request. This changes the way how the console handles the authorization data provided by the user.

Comparing to the previous version:

  • Authorization data are applied to the request in the moment when the user decide to send the request and not when the data in the editor change
  • The “auth” property of the request object is now an array of all security definitions applied to the request
  • When the authorization settings only manipulate headers or query parameters then this parameters are applied to the request object at the moment of dispatching the “api-request” event
  • Settings for each authorization depends on the type of the security scheme. Learn more in the api-authorization component documentation https://github.com/advanced-rest-client/api-authorization#authorization-settings

OAS’ links and callbacks

API Console now renders links and callback documentation in the method (operation) documentation screen. This is not supported by the request editor at the time as there’s no actual flow in making a request.

Other changes

  • Added support for “no-auto-encoding” annotation. If enabled on an URI parameter, the API Console will not automatically encode the URI parameter value from the specification. For example:
paramName:
  (no-auto-encoding):
    type: string

Deprecation notice

The URL editor is planned to be removed from the request editor. The reason is to simplify the UI and request editing logic. The end-user now can use the server selector to provide the base URI if needed and the rest of URI/query parameters can be defined in the request editor.
Currently we are preparing to gather usage data from the URL editor in the Anypoint platform to recognize possible result of this change. The removal is planned in Q4 2020.

v6.1.1

31 Mar 19:24
cf1fabf
Compare
Choose a tag to compare
  • fixed issues with multiple security scheme names in the navigation by adding name of the scheme to the type
  • upgrading AMF processor helper to better support OAS 3 features and build background for OAS 3 full support
  • upgraded lit-html and lit-element libraries to the latest version
  • upgraded dev dependencies

v6.0.1

06 Feb 19:17
94286e0
Compare
Choose a tag to compare
  • cleared dependencies
  • updates api-summary component with sanitization enabled for license URLs

v6.0.0

16 Jan 19:35
5d6e625
Compare
Choose a tag to compare
  • Upgrade to final web components specification: replacing HTML imports with JavaScript modules
  • Replacing Polymer with super lightweight, almost native, LitElement. This triggers a series of changes:
    • All dash-case attributes are now "no-dash", lowercase, web style attributes. For example old redirect-uri is now redirecturi. This is true for all properties used as HTML attribute. Properties names are the same.
    • New templating engine. API Console now uses lit-html which is performant HTML templating system.
    • Build process is completely different. See documentation at https://docs.api-console.io.
  • Redesigned base input controls. API console now uses own, material design based, basic UI input controls. It comes with 3 predefined styles:
    • Default - Material design filled style
    • Outlined - Material design outlined state controlled by outlined attribute
    • Anypoint - Compatibility layer with the Anypoint platform. Controlled by compatibility attribute
  • The request panel (aka try it) now only renders editors that corresponds to the API data model. This means that, for example, if headers are not defined for given operation then headers panel is not rendered.
  • Dropped support for tabs view for the editors in the request panel and they are stacked now.
  • Code mirror dependency requires some additional libraries that won't work inside JavaScript module. This means that those libraries have to be included into the web application before initializing the element. See the documentation or readme file for details.
  • API Console is now WCAG compliant. All components used to build the console passed axe-core tests and therefore are fully accessible.
  • The application and the component are now split into separate components. Use api-console custom element for embedding the console inside existing web application and api-console-app to create stand alone application.
  • New demo pages. Preview the console with npm start command (run inside cloned repository) to see API console with various scenarios and configuration options.
  • Removed any reference to CSS mixins (the @apply function). All styling options are now defined via CSS variables. Any styles defined for previous version of API console won't work.
  • Minimised use of icons in favour of regular buttons with labels.
  • This release contains tones of bug fixes and improvements reported by the community and our customers ❤
  • The Chrome proxy extension banner is not rendered by default. Set allowExtensionBanner property to initialize the console with the extension support.
  • Added configuration option to set a static OAuth 2 client ID and secret for the application. This way it is easier to demo an API by providing demo client id.
  • Added markdown sanitization
  • Now XML schemas and examples are propertly rendered.
  • Huge XML schemas are now not syntax highlighted (above 10K characters) as it causes the browser to hang.
  • XML examples are now properly formatted and RAML type name is properly resolved (instead of <model> element)

v3.0.34

30 Aug 12:28
Compare
Choose a tag to compare

New headers for mocking service requests

v3.0.33

26 Jun 13:04
b810527
Compare
Choose a tag to compare

Bug fixing.

v5.0.2

29 May 19:43
0ac167f
Compare
Choose a tag to compare

The release contains several bug fixes and improvements:

  • Updated AMF parser version and support for new model structure
  • Fixed examples rendering in the type documentation
  • Now type documentation renders generated JSON/XML schema when RAML's mediaTypes / OAS' produces property is set
  • Examples now have default values for boolean, number, and null values when default value and example is missing.

v3.0.32

06 May 15:47
Compare
Choose a tag to compare

Bump parser to version v1.1.50

v5.0.1

13 Mar 16:45
1dc579b
Compare
Choose a tag to compare

Fixin vulnerability issues.

v6.0.0-preview.1

01 Mar 20:29
0345e56
Compare
Choose a tag to compare
v6.0.0-preview.1 Pre-release
Pre-release

Preview of ES6 modules version of API Console.
This is early preview, not targeted for production.

Try it and give us your feedback.