Skip to content

Commit e3ef0e4

Browse files
committed
Preparing the console for a release.
1 parent f48674d commit e3ef0e4

File tree

10 files changed

+253
-22
lines changed

10 files changed

+253
-22
lines changed

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ __See live example of the API console in our [demo application][].__
44

55
MuleSoft's API Console is a full-fledged API documentation tool that generates mobile-friendly web documentation based on RAML (Restful API Modeling Language) or OAS (Open API specification) documents. In addition to providing documentation, the tool provides the capability for users to try out requests on the fly.
66

7+
![API console design](docs/APIC-main-promo.png)
8+
79
## API console 5.0 is here!
810

911
Great news! Next version of API console is here! The upgrade includes new design, new data model and and build process that allows reduce size of the console.
@@ -13,11 +15,7 @@ Great news! Next version of API console is here! The upgrade includes new design
1315
We are working very hard to deliver first in class solutions for API documentation.
1416
MuleSoft's AMF allows to parse any* API document and produces common data model. API console consumes this model instead of RAML JS parser's.
1517

16-
\* Currently AMF supports RAML 0.8, RAML 1.0, OAS 1.0 and OAS 2.0. It can be extended by defining new vocabulary to support other API spec formats.
17-
18-
### Native support for web components
19-
20-
API console now support final version of web components specification. This mean no more polyfills and less source code to be downloaded.
18+
\* Currently AMF supports RAML 0.8, RAML 1.0, OAS 2.0 and OAS 3.0. It can be extended by defining new vocabulary to support other API spec formats.
2119

2220
### Redesign
2321

@@ -156,24 +154,24 @@ git clone https://github.com/mulesoft/api-console.git
156154
cd api-console
157155
```
158156

159-
2. Checkout the latest version.
157+
2. Install [polymer-cli][] and [Bower][].
160158
```
161-
git checkout 5.0.0-preview
159+
sudo npm install -g bower polymer-cli
162160
```
163161

164-
3. Install [polymer-cli][] and [Bower][].
162+
3. Install dependencies.
165163
```
166-
sudo npm install -g bower polymer-cli
164+
bower install && npm i
167165
```
168166

169-
4. Install dependencies.
167+
4. Serve the element.
170168
```
171-
bower install
169+
polymer serve --open
172170
```
173171

174-
5. Serve the element.
172+
5. If you are planning to parse own RAML/OAS file then additionally run this command to run AMF parsing service for the demo page:
175173
```
176-
polymer serve --open
174+
npm staret
177175
```
178176

179177
The default page is the element's documentation. Switch to demo to see a working example.

api-console.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
<template>
3535
<style>
3636
:host {
37-
--app-primary-color: #00A2DF;
38-
--app-secondary-color: black;
37+
--app-primary-color: var(--api-console-primary-color, #00A2DF);
38+
--app-secondary-color: var(--api-console-secondary-color, black);
3939
display: block;
40-
background-color: var(--primary-background-color, transparent);
40+
background-color: var(--api-console-primary-background-color, var(--primary-background-color, transparent));
4141
@apply --arc-font-body1;
4242
}
4343

@@ -84,7 +84,7 @@
8484
}
8585

8686
:host([layout-narrow]) app-drawer {
87-
z-index: 1;
87+
z-index: var(--api-console-drawer-zindex, 1);
8888
}
8989

9090
app-toolbar {
@@ -141,7 +141,7 @@
141141

142142
api-request-panel,
143143
api-documentation {
144-
max-width: var(--api-console-main-max-width, 900px);
144+
max-width: var(--api-console-main-max-width, 1600px);
145145
}
146146

147147
.api-docs {
@@ -190,6 +190,10 @@
190190
margin: 0;
191191
@apply --api-method-documentation-title-narrow;
192192
}
193+
194+
.store-link {
195+
@apply --arc-link;
196+
}
193197
</style>
194198
<template is="dom-if" if="[[app]]" restamp="true">
195199
<iron-media-query query="(max-width: 740px)" query-matches="{{narrow}}"></iron-media-query>
@@ -233,7 +237,7 @@ <h1 class="method-title">[[methodName]]</h1>
233237
</div>
234238
</div>
235239
<div class="extension-banner" active$="[[extensionBannerActive]]">
236-
<p>For better experience install API console extension. Get it from <a target="_blank" href="https://chrome.google.com/webstore/detail/olkpohecoakpkpinafnpppponcfojioa">Chrome Web Store</a></p>
240+
<p>For better experience install API console extension. Get it from <a target="_blank" class="store-link" href="https://chrome.google.com/webstore/detail/olkpohecoakpkpinafnpppponcfojioa">Chrome Web Store</a></p>
237241
<paper-icon-button icon="arc:close" on-click="dismissExtensionBanner"></paper-icon-button>
238242
</div>
239243
<api-request-panel
@@ -266,7 +270,7 @@ <h1 class="method-title">[[methodName]]</h1>
266270
<template is="dom-if" if="[[_renderInlineTyit]]" restamp>
267271
<div class="inline-request">
268272
<div class="extension-banner" active$="[[extensionBannerActive]]">
269-
<p>For better experience install API console extension. Get it from <a target="_blank" href="https://chrome.google.com/webstore/detail/olkpohecoakpkpinafnpppponcfojioa">Chrome Web Store</a></p>
273+
<p>For better experience install API console extension. Get it from <a target="_blank" class="store-link" href="https://chrome.google.com/webstore/detail/olkpohecoakpkpinafnpppponcfojioa">Chrome Web Store</a></p>
270274
<paper-icon-button icon="arc:close" on-click="dismissExtensionBanner"></paper-icon-button>
271275
</div>
272276
<api-request-panel

demo/standalone/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
case 'manualNavigation':
244244
case 'navigationOpened':
245245
case 'noExtensionBanner':
246+
case 'inlineMethods':
246247
let apiConsole = document.querySelector('api-console');
247248
apiConsole[action] = e.detail.value;
248249
break;

demo/standalone/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
<paper-item>
7373
<paper-toggle-button data-action="noExtensionBanner">No extension banner</paper-toggle-button>
7474
</paper-item>
75+
<paper-item>
76+
<paper-toggle-button data-action="inlineMethods">Render Try It inline with method documentation</paper-toggle-button>
77+
</paper-item>
7578
<paper-item data-click-action="goBack">Close this API</paper-item>
7679
</paper-listbox>
7780
</paper-menu-button>

demo/themed/apic-theme-file.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
--arc-menu-height: 100%;
110110
--menu-selection-background-color: #00b9ff;
111111
--arc-menu-selected-background-color: var(--menu-selection-background-color);
112-
--error-color: #FF5722;
112+
--error-color: #ff835c;
113113

114114
--api-console-toolbar-background-color: var(--primary-background-color);
115115
--api-console-toolbar-color: #fff;
@@ -135,6 +135,7 @@
135135
width: 36px;
136136
height: 36px;
137137
}
138+
--api-navigation-endpoint-toggle-icon-hover-color: #eaeaea;
138139

139140
/* Method labels in method documentation title */
140141
--method-display-get-background-color: rgb(0, 128, 0);
@@ -269,6 +270,7 @@
269270
--code-mirror-atom-color: var(--code-type-boolean-value-color);
270271
--code-mirror-cursor-color: #fff;
271272
--code-mirror-variable-color: #FFC107;
273+
--code-mirror-attribute-color: #ff5fff;
272274

273275
--arc-status-code-color-300: #3F51B5;
274276

@@ -295,6 +297,7 @@
295297
--api-annotation-document-color: #ECEFF1;
296298
--apic-tryint-wide-background-color: #263238;
297299
--api-console-extension-banner-color: rgba(255, 255, 255, 0.54);
300+
--from-row-action-icon-color: rgba(255, 255, 255, 0.77);
298301
--from-row-action-icon-color-hover: rgba(255, 255, 255, 0.87);
299302
--api-method-documentation-bottom-navigation-color: #fff;
300303
--api-type-document-property-color: #ECEFF1;
@@ -304,6 +307,9 @@
304307
}
305308

306309
--api-navigation-path-label-color: #CFD8DC;
310+
--arc-link: {
311+
color: #68b4ff;
312+
};
307313
}
308314
</style>
309315
</custom-style>

demo/themed/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
case 'manualNavigation':
244244
case 'navigationOpened':
245245
case 'noExtensionBanner':
246+
case 'inlineMethods':
246247
let apiConsole = document.querySelector('api-console');
247248
apiConsole[action] = e.detail.value;
248249
break;

demo/themed/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@
7575
<paper-item>
7676
<paper-toggle-button data-action="noExtensionBanner">No extension banner</paper-toggle-button>
7777
</paper-item>
78+
<paper-item>
79+
<paper-toggle-button data-action="inlineMethods">Render Try It inline with method documentation</paper-toggle-button>
80+
</paper-item>
7881
<paper-item data-click-action="goBack">Close this API</paper-item>
7982
</paper-listbox>
8083
</paper-menu-button>

docs/APIC-main-promo.png

125 KB
Loading

test/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
'basic-test.html',
1515
'raml-aware-test.html',
1616
'amf-computations-test.html',
17-
'attribution-test.html'
17+
'attribution-test.html',
18+
'integration-test.html'
1819
]);
1920
</script>
2021
</body>

0 commit comments

Comments
 (0)