Skip to content

Commit

Permalink
Release/6.2.1 (#644)
Browse files Browse the repository at this point in the history
* feat: adding support for OAS' external documentation

* chore: updating dev dependencies

* chore: major upgrading dev dependencies

* chore: deep-updating dependencies

* build: bumping version

* fix: fixing api-response event registration on the request panel

* fix: updating component to dix diplicated headers issue

* chore: updating dependencies

* chore: adding types declaration files

* chore: adding index.js file

* chore: updating dependencies for authorization

* fix: fixing passing the `amf` property in the request panel

* chore(demo): add multi-server to element demo

* fix: override base servers with operation servers

* fix: tests, update deps

* test: increase timeout to 25s

* test: should be last test fixing

* fix(server): set type before value

* test: debugging SL tests

* test: debugging SL tests

* Revert "test: debugging SL tests"

This reverts commit 532f6ed.

* Revert "test: debugging SL tests"

This reverts commit 4cfd9a7.

* Revert "fix(server): set type before value"

This reverts commit 9140820.

* Revert "test: should be last test fixing"

This reverts commit 26a1549.

* Revert "test: increase timeout to 25s"

This reverts commit 613c895.

* chore: add .idea to .gitignore

* test: increase timeout to 25s

* test: should be last test fixing

* fix(server): set type before value

* fix(type-document): update to version 4.1.0

Fixes APIC-405

* test: change test to use custom instead of server

* test: skip a server test

Co-authored-by: Francisco Di Giandomenico <[email protected]>
  • Loading branch information
jarrodek and twoplustwoone authored May 27, 2020
1 parent 0ffcc85 commit 189d5c5
Show file tree
Hide file tree
Showing 23 changed files with 4,357 additions and 1,319 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ dist/

# AMF models
demo/models/*.json

.idea/
7 changes: 7 additions & 0 deletions api-console-app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { ApiConsoleApp } from './src/ApiConsoleApp';

declare global {
interface HTMLElementTagNameMap {
"api-console-app": ApiConsoleApp;
}
}
14 changes: 1 addition & 13 deletions api-console-app.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
/**
@license
Copyright 2018 The Advanced REST client authors <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/
import { ApiConsoleApp } from './src/ApiConsoleApp.js';

window.customElements.define('api-console-app', ApiConsoleApp);
7 changes: 7 additions & 0 deletions api-console.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { ApiConsole } from './src/ApiConsole';

declare global {
interface HTMLElementTagNameMap {
"api-console": ApiConsole;
}
}
14 changes: 1 addition & 13 deletions api-console.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
/**
@license
Copyright 2018 The Advanced REST client authors <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/
import { ApiConsole } from './src/ApiConsole.js';

window.customElements.define('api-console', ApiConsole);
2 changes: 1 addition & 1 deletion demo/demo-server/api/amf-service/amf-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class AmfService {
}
/**
* Parses API data using AMF parser.
* @param {?String} mainFile Main API file to use.
* @param {String=} mainFile Main API file to use.
* @return {Promise<Object>} A promise resolved to AMF model.
*/
async parse(mainFile) {
Expand Down
4 changes: 2 additions & 2 deletions demo/demo-server/api/api-parser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AmfService } from './amf-service/amf-service.js';
import NodeCache from 'node-cache';
import uuidv4 from 'uuid/v4.js';
import { v4 as uuidv4 } from 'uuid';

export class ApiParser {
async parseFile(request) {
Expand Down Expand Up @@ -32,7 +32,7 @@ export class ApiParser {
/**
* Parses API data to AMF model.
* @param {Buffer} buffer Buffer created from API file.
* @param {Object} opts Processing options:
* @param {Object=} opts Processing options:
* - zip {Boolean} If true the buffer represents zipped file.
* @return {Promise<Object>} Promise resolved to the AMF json-ld model
*/
Expand Down
3 changes: 2 additions & 1 deletion demo/element/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class ApicApplication extends DemoBase {
['google-drive-api', 'Google Drive API'],
['httpbin', 'HTTPbin API'],
['data-type-fragment', 'RAML data type fragment'],
['demo-api', 'Demo API']
['demo-api', 'Demo API'],
['multi-server', 'Multi Server API'],
];

this.toggleConsoleMenu = this.toggleConsoleMenu.bind(this);
Expand Down
30 changes: 13 additions & 17 deletions demo/models/multi-server/multi-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,6 @@ servers:
- url: http://beta.api.openweathermap.org/data/2.5/
description: Beta server

# Relative URL to external documentation
externalDocs:
url: /docs
description: Find more info here

# Relative URLs to OAuth2 authorization and token URLs
components:
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: /oauth/dialog
tokenUrl: /oauth/token
scopes: {}

paths:
/default:
description: A default path to the API
Expand All @@ -53,6 +37,18 @@ paths:
responses:
200:
description: Successful response
/duplicated:
description: Has some of the default servers
servers:
- url: https://api.openweathermap.org/data/2.5/
description: Production server
- url: http://beta.api.openweathermap.org/data/2.5/
description: Beta server
get:
summary: "A get method"
responses:
200:
description: Successful response
/files:
description: File upload and download operations
servers:
Expand Down Expand Up @@ -81,4 +77,4 @@ paths:
summary: "A post method"
responses:
201:
description: Successful create
description: Successful create
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { ApiConsole } from './src/ApiConsole';
export { ApiConsoleApp } from './src/ApiConsoleApp';
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { ApiConsole } from './src/ApiConsole.js';
export { ApiConsoleApp } from './src/ApiConsoleApp.js';
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = (config) => {

client: {
mocha: {
timeout: 20000
timeout: 25000
}
},

Expand Down
Loading

0 comments on commit 189d5c5

Please sign in to comment.