Skip to content

Commit 0ffcc85

Browse files
authored
Merge pull request #640 from mulesoft/feat/oas3
Adds OAS 3.x support
2 parents b31cac9 + b53a6d5 commit 0ffcc85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2681
-2364177
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @mulesoft/team-api-console

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,6 @@ node_modules
5858
coverage
5959
demo/vendor.js
6060
dist/
61+
62+
# AMF models
63+
demo/models/*.json

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: node_js
22
node_js: stable
3-
sudo: required
43
addons:
54
chrome: stable
65
script:

demo/api-console-master-styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ html {
1313

1414
--anypoint-listbox-background-color: #fff;
1515

16-
--arc-font-body1-font-size: 15px;
16+
--arc-font-body1-font-size: 16px;
1717
--arc-font-body1-font-weight: 400;
1818
--arc-font-body1-line-height: 20px;
1919
--arc-font-code-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;

demo/apis.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
"models/console-445/console-445.raml": "RAML 1.0",
1212
"models/apic-80/apic-80.raml": "RAML 1.0",
1313
"models/apic-83/apic-83.raml": "RAML 1.0",
14-
"models/apic-130/apic-130.raml": "RAML 1.0"
14+
"models/multi-server/multi-server.yaml": { "type": "OAS 3.0", "mime": "application/yaml" }
1515
}

demo/demo-server/api.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ async function apiRequest(ctx) {
2626
}
2727
} catch (e) {
2828
body = wrapError(e);
29+
console.error(e);
2930
}
3031
/* eslint-disable require-atomic-updates */
3132
if (body.code) {

demo/demo-server/api/amf-service/api-search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class ApiSearch {
134134
contentType: 'application/json'
135135
};
136136
}
137-
const oasMatch = data.match(/openapi|swagger(?:\s*)?:(?:\s*)("|')?(\d\.\d*)("|')?/im);
137+
const oasMatch = data.match(/(?:openapi|swagger)[^\s*]?:(?:\s*)("|')?(\d\.\d)("|')?/im);
138138
if (oasMatch) {
139139
const v = oasMatch[2].trim();
140140
return {

0 commit comments

Comments
 (0)