Skip to content

Commit

Permalink
Merge pull request #640 from mulesoft/feat/oas3
Browse files Browse the repository at this point in the history
Adds OAS 3.x support
  • Loading branch information
jarrodek authored Apr 28, 2020
2 parents b31cac9 + b53a6d5 commit 0ffcc85
Show file tree
Hide file tree
Showing 60 changed files with 2,681 additions and 2,364,177 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @mulesoft/team-api-console
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ node_modules
coverage
demo/vendor.js
dist/

# AMF models
demo/models/*.json
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js: stable
sudo: required
addons:
chrome: stable
script:
Expand Down
2 changes: 1 addition & 1 deletion demo/api-console-master-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ html {

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

--arc-font-body1-font-size: 15px;
--arc-font-body1-font-size: 16px;
--arc-font-body1-font-weight: 400;
--arc-font-body1-line-height: 20px;
--arc-font-code-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
Expand Down
2 changes: 1 addition & 1 deletion demo/apis.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"models/console-445/console-445.raml": "RAML 1.0",
"models/apic-80/apic-80.raml": "RAML 1.0",
"models/apic-83/apic-83.raml": "RAML 1.0",
"models/apic-130/apic-130.raml": "RAML 1.0"
"models/multi-server/multi-server.yaml": { "type": "OAS 3.0", "mime": "application/yaml" }
}
1 change: 1 addition & 0 deletions demo/demo-server/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ async function apiRequest(ctx) {
}
} catch (e) {
body = wrapError(e);
console.error(e);
}
/* eslint-disable require-atomic-updates */
if (body.code) {
Expand Down
2 changes: 1 addition & 1 deletion demo/demo-server/api/amf-service/api-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class ApiSearch {
contentType: 'application/json'
};
}
const oasMatch = data.match(/openapi|swagger(?:\s*)?:(?:\s*)("|')?(\d\.\d*)("|')?/im);
const oasMatch = data.match(/(?:openapi|swagger)[^\s*]?:(?:\s*)("|')?(\d\.\d)("|')?/im);
if (oasMatch) {
const v = oasMatch[2].trim();
return {
Expand Down
Loading

0 comments on commit 0ffcc85

Please sign in to comment.