Commit Graph

267 Commits

Author SHA1 Message Date
James Gatz
7988137f2c
upgrade vite to v3 (#5417)
* update type-fest imports

* move main css to html

* update electron imports

* update nunjucks imports

* use swagger ui dist

* remove commonjs-externals and add electron node require plugin

* update package

* fix misc.ts imports

* remove buffer from builtins since we use a package for it

* plugin docs

* Update packages/insomnia/src/main/window-utils.ts

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-11-17 13:37:53 +01:00
Filipe Freire
d2bfee8d87 Bump app version to 2022.7.0-beta.4 and lerna package versions 2022-11-02 15:05:46 +00:00
Filipe Freire
8bc11f2b89 v3.6.1-beta.3 2022-11-02 15:05:27 +00:00
Jack Kavanagh
2bdd84ad22
make all packages private (#5339)
* make all packages private

* remove lerna json and publish scripts

* clean up npmignores

* remove major npm github ci logic
2022-10-27 17:55:30 +02:00
Antoine Jacquemin
d102de2850
Fix how path variables are escaped for Swagger (#5246)
* path escapte fix 

paths in swagger are not correctly escaped and won't be correct. You can try with following swagger:

openapi: 3.0.0
info:
 title: SampleAPI
 version: "1.0"
tags:
  - description: Sample API
    name: Sample Echo API
paths:
  /healthcheck/$echo:
    get:
      parameters:
        - in: query
          name: message
          required: true
          schema:
            type: string
          description: The echo message
      responses:
        "200":
          description: An echo message.
      summary: Return a echo message.
      operationId: getEcho
      tags:
        - Generate echo message
  /batchs(Material='{Material}',Batch='{Batch}'):
    get:
      parameters:
        - in: path
          name: Material
          required: true
          schema:
            type: string
          description: The echo message
        - in: path
          name: Batch
          required: true
          schema:
            type: string
          description: The echo message
      responses:
        "200":
          description: An echo message.
      summary: Return a echo message.
      operationId: getBatch
      tags:
        - Generate echo message
servers:
  - url: https://httpbin.org/anything

* Update test for new regex fix

* Update common.test.ts

* Update common.ts

* Update common.test.ts

* Update common.ts

* Update common.test.ts

* Update common.ts

* Patch-Regex-Text

* Update services.test.ts

* Update httpbin.expected.json

* Update link-example.expected.json

* Update petstore-expanded.expected.json

* Update petstore.expected.json

* Update request-validator-plugin.expected.json

* Update uspto.expected.json

* Update generate.js

* Update generate.js
2022-10-24 16:00:34 -04:00
kreosus
ba39cbe955 Bump app version to 2022.7.0-beta.3 and lerna package versions 2022-10-20 10:57:32 +00:00
kreosus
a29f1c952b Bump app version to 2022.7.0-beta.2 and lerna package versions 2022-10-13 16:58:19 +00:00
Jack Kavanagh
49a792b4a4
o2k: removed partial support for oauth2 (#5260)
* o2k: removed partial support for oauth2

* Fix fixtures

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-10-12 17:39:23 +02:00
kreosus
a2d503da08 Bump app version to 2022.7.0-beta.1 and lerna package versions 2022-10-06 13:38:10 +00:00
kreosus
123253811c Bump app version to 2022.6.0 and lerna package versions 2022-09-26 16:08:47 +00:00
kreosus
674874e3ac Bump app version to 2022.6.0-beta.4 and lerna package versions 2022-09-01 12:08:01 +00:00
kreosus
02f507d745 Bump app version to 2022.6.0-beta.3 and lerna package versions 2022-08-25 12:30:08 +00:00
Filipe Freire
854c08a76e Bump app version to 2022.6.0-beta.2 and lerna package versions 2022-08-18 12:23:48 +00:00
David Marby
e724dd78a5 Bump app version to 2022.5.1 and lerna package versions 2022-08-17 10:46:46 +00:00
kreosus
aec2bd1758 Bump app version to 2022.6.0-beta.1 and lerna package versions 2022-08-11 19:06:36 +00:00
Filipe Freire
b72c923746 Bump app version to 2022.5.0 and lerna package versions 2022-08-02 16:25:13 +00:00
Filipe Freire
08ae04f241 Bump app version to 2022.5.0-beta.7 and lerna package versions 2022-08-02 10:05:29 +00:00
James Gatz
e76735c709 Bump app version to 2022.5.0-beta.6 and lerna package versions 2022-07-28 13:48:13 +00:00
David Fluck
e930140bd0 Bump app version to 2022.5.0-beta.5 and lerna package versions 2022-07-21 17:33:22 +00:00
kreosus
68541bdab9 Bump app version to 2022.5.0-beta.4 and lerna package versions 2022-07-14 14:02:53 +00:00
Mark Kim
2a315a5242
fix(openapi2kong): removing unused component reference (#4911)
* add removing logic

* add recursion

* add comments

* add circular ref yaml and its expected mock

* change the $refs.get to the check method

* add path buildilng

* add for loop

* simplifies circular test

* add feedback

* add comments

* add clean up and doc

* adds response to circular-requestBody.yaml so that it's valid & lints

* inlines helpers (and catches null cases it missed)

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-07-07 15:41:12 -04:00
Filipe Freire
2af3eff41b Bump app version to 2022.5.0-beta.3 and lerna package versions 2022-07-07 15:37:58 +00:00
David Marby
946b5627bc Bump app version to 2022.5.0-beta.2 and lerna package versions 2022-06-30 08:10:31 +00:00
Dimitri Mitropoulos
ed3aad6046
tsconfig cleanup (#4908) 2022-06-27 12:57:50 -04:00
Mark Kim
4f5ef73f7e
fix: adding a fix to the openapi2kong circular deps issue (#4872)
* commit progress

* save changes

* add components and $schema

* add components and $schema

* adding a doc

* add typings

* fix unit tests

* fix unit tests

* add fix and verified with kong cli

* fix unit tests

* Improve types and parameter/body resolution

Co-authored-by: Mark Kim <marckong@users.noreply.github.com>

* fix circular "components" issue

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
Co-authored-by: Mark Kim <marckong@users.noreply.github.com>
2022-06-24 19:48:45 +00:00
Wils Dawson
b400eb1160 Bump app version to 2022.5.0-beta.1 and lerna package versions 2022-06-23 14:10:00 +00:00
Filipe Freire
f44da26ff3 Bump app version to 2022.4.2 and lerna package versions 2022-06-22 14:24:12 +00:00
Filipe Freire
07c5b0cc66 Bump app version to 2022.4.1 and lerna package versions 2022-06-15 09:56:45 +00:00
Filipe Freire
2d6d9ec37f Bump app version to 2022.4.0 and lerna package versions 2022-06-09 08:05:54 +00:00
Filipe Freire
10faac4232 Bump app version to 2022.4.0-beta.4 and lerna package versions 2022-06-08 09:21:49 +00:00
Mark Kim
35f5094048 Bump app version to 2022.4.0-beta.3 and lerna package versions 2022-06-02 13:20:00 +00:00
Dimitri Mitropoulos
0dd6090f1b Bump app version to 2022.4.0-beta.2 and lerna package versions 2022-05-19 14:12:37 +00:00
Dimitri Mitropoulos
52393eccc0
chore(deps): upgrades jest to 28 (#4783) 2022-05-17 08:18:06 -04:00
Filipe Freire
c18a729fe7 Bump app version to 2022.4.0-beta.1 and lerna package versions 2022-05-12 13:27:17 +00:00
David Marby
e2d2c3093d Bump app version to 2022.4.0-beta.0 and lerna package versions 2022-05-05 10:22:35 +00:00
David Marby
e7730587ef Bump app version to 2022.3.0 and lerna package versions 2022-04-22 11:53:32 +00:00
David Marby
0d46d18847 Bump app version to 2022.3.0-beta.4 and lerna package versions 2022-04-20 15:19:38 +00:00
Filipe Freire
7e209fa20a
Fix FTI-3278, missing null type for kong request-validator plugin on nullable true. (#4675) 2022-04-19 20:53:20 +00:00
Filipe Freire
cc63a1ccec
Chore: Update extensions/v1beta1 to networking.k8s.io/v1 on OpenAPI-2-Kong (#4667)
* Update extensions/v1beta1 to  networking.k8s.io/v1

This is follow the deprecation guide of past k8s version 1.22

https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122

* Fix other deprecated k8s ingress interfaces.

* Fix typo in url.
2022-04-19 18:00:23 +00:00
Filipe Freire
03fdd2eb7d Bump app version to 2022.3.0-beta.3 and lerna package versions 2022-04-07 16:59:54 +00:00
Dimitri Mitropoulos
9700e7bde8
Remove flow (and webpack) from portal plugin, replace with TS and ESBuild (#4650) 2022-04-04 12:17:01 +00:00
Filipe Freire
273b26b0b4 Bump app version to 2022.3.0-beta.2 and lerna package versions 2022-03-31 14:28:34 +00:00
Filipe Freire
e8c19f44e5
Reproduce and Fix #4432 (#4657)
* Add failing fixtures that repro #4432

* Add test for generateSlug

* Fix #4432. Pin slugify to 1.6.5.
2022-03-30 13:31:15 +00:00
James Gatz
65203b89b0
update swagger-parser and support oas 3.0.3 (#4654)
Co-authored-by: Dimitri Mitropoulos <dimitropoulos@users.noreply.github.com>
2022-03-29 18:13:28 +02:00
Dane Mortimer
17f0a43f62
Concating x-kong-security-openid-connect config with security schemas… (#4607)
* Concating x-kong-security-openid-connect config with security schemas config

* Removing enabled as it is enabled by default

* Small improvement + add tests


Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-03-29 12:44:25 +00:00
Filipe Freire
298f394e3b Bump app version to 2022.3.0-beta.1 and lerna package versions 2022-03-28 15:17:18 +00:00
Filipe Freire
eb9fa48e14
All dependabot PRS 2022 03 24 (#4636)
* Bump minimist from 1.2.5 to 1.2.6 in /packages/insomnia-config

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.6 in /packages/insomnia-testing

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.6 in /packages/insomnia-smoke-test

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.6 in /packages/openapi-2-kong

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.6 in /packages/insomnia-send-request

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.6 in /packages/insomnia-inso

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* (temp) run bootstrap

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-25 10:19:20 +00:00
David Marby
f96d151371 Bump app version to 2022.3.0-beta.0 and lerna package versions 2022-03-24 12:33:04 +00:00
Filipe Freire
ef855863e2 Bump app version to 2022.2.1 and lerna package versions 2022-03-21 15:13:28 +00:00
David Marby
1cd225a9f5 Bump app version to 2022.2.0 and lerna package versions 2022-03-15 11:18:53 +00:00
David Marby
9d6caafd7a
Remove gitHead from package.json files (#4584) 2022-03-10 19:49:17 +00:00
David Marby
d3b4322bf2
Fix lerna version bumps and don't run release recurring for release PRs (#4576) 2022-03-10 16:58:42 +01:00
David Marby
6f81d98125 Bump app version to 2022.2.0-alpha.0 and lerna package versions 2022-03-10 12:00:04 +00:00
Filipe Freire
1ebfb4dee2 version packages lib@2.6.0-beta.0 2022-03-09 17:17:03 +00:00
David Marby
0d86e8e0e7 Merge branch 'release/2022.1.1' into develop 2022-03-09 15:12:25 +01:00
David Marby
53816f1eb9 version packages lib@2.5.2 2022-03-09 13:21:56 +01:00
Dimitri Mitropoulos
f86ee53ea2
updates type-fest to latest (#4552) 2022-03-08 18:05:21 -05:00
Jack Kavanagh
1f05683fad
Chore/upgrade-electron-17 (#4529)
* bump node, electron, libcurl

* bump electron-builder

* stub performance, because inso imports react

* bump @types/node

* match up builder versions

* Disable consent prompts for oidc server

* bump electron and libcurl to latest

* waitForCookies for oauth tests

* Bump NodeJS to 16.13.0

* removes node 14 hack for BufferEncoding

* Replace oidc-provider html interaction pages with a simple html form

* make document cookie wait explicit

Co-authored-by: David Marby <david@dmarby.se>
2022-03-07 13:10:35 +00:00
David Marby
6bd1173c7a Merge branch 'release/2022.1.0' into develop 2022-03-01 18:45:22 +01:00
David Marby
2b802ceb0d version packages lib@2.5.1 2022-03-01 18:21:42 +01:00
David Marby
2dd8ef20bb version packages lib@2.5.1-beta.2 2022-03-01 18:05:04 +01:00
David Marby
a9fc51fbe5 version packages lib@2.5.1-beta.1 2022-03-01 17:44:30 +01:00
David Marby
a19466fc97 version packages lib@2.5.1-beta.0 2022-03-01 17:15:38 +01:00
David Marby
66ea00edd8 version packages lib@2.5.0 2022-03-01 15:24:59 +01:00
Dimitri Mitropoulos
0b7a61fdee Merge branch 'release/2022.1.0-beta.0' into develop 2022-02-15 09:13:42 -05:00
Dimitri Mitropoulos
e621006db0
dependabot PRs as of 2022 02 14 (#4492) 2022-02-14 22:18:53 +00:00
Dimitri Mitropoulos
6d4ee8f998
all dependabot PRs as of 20220802 (#4468)
* Bump hosted-git-info from 2.8.8 to 2.8.9 in /packages/openapi-2-kong

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump ws from 7.4.3 to 7.5.7 in /packages/openapi-2-kong

Bumps [ws](https://github.com/websockets/ws) from 7.4.3 to 7.5.7.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.3...7.5.7)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump lodash from 4.17.15 to 4.17.21 in /packages/openapi-2-kong

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.21)

---
updated-dependencies:
- dependency-name: lodash
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-09 10:50:57 +00:00
Filipe Freire
d8137126cb
all dependabot PRs as of 2022 02 08 (#4462)
* Bump path-parse from 1.0.6 to 1.0.7 in /packages/openapi-2-kong

Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump ansi-regex from 5.0.0 to 5.0.1 in /packages/openapi-2-kong

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump tmpl from 1.0.4 to 1.0.5 in /packages/openapi-2-kong

Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-08 16:15:02 -05:00
Dimitri Mitropoulos
8490bad55c version packages lib@2.5.0-beta.1 2022-02-08 11:39:25 -05:00
Dimitri Mitropoulos
081fb995a6 version packages lib@2.5.0-beta.0 2022-02-08 11:37:36 -05:00
Jack Tysoe
0ae0dd4944
Allow overriding "coreAnnotations" on Kubernetes Ingress objects (#4349) 2022-01-10 17:07:56 -05:00
Jack Kavanagh
b2dd09341c
cache lint (#4302) 2021-12-10 23:10:20 +00:00
Opender Singh
4da3a75bf3 Merge branch 'release/2021.7.0-beta.0' into develop 2021-12-09 11:50:40 +13:00
Opender Singh
dc442174c0 version packages lib@2.4.1 2021-12-09 10:19:11 +13:00
Opender Singh
6dab019a12
Make note about servers on a path or operation being ignored clearer (#4262) 2021-12-07 23:28:49 +00:00
Opender Singh
f1284ed469 version packages lib@2.4.1-beta.1 2021-12-07 07:11:47 +13:00
Opender Singh
be1757e27e
Append upstream name using a utility (#4135) 2021-11-08 11:11:15 +00:00
Opender Singh
8918b15113 Merge branch 'release/2021.6' into develop 2021-10-28 10:48:51 +13:00
Opender Singh
e02e5d404f version packages lib@2.4.0 2021-10-28 09:47:44 +13:00
Jack Kavanagh
3e7a7d7cea
only add upstreams when needed (#4105) 2021-10-24 19:10:02 +00:00
Opender Singh
b7248025e7 version packages lib@2.4.0-alpha.1 2021-10-21 22:15:57 +13:00
Opender Singh
9fb54ec187 version packages lib@2.3.3-alpha.4 2021-10-15 13:12:49 +13:00
Opender Singh
06b873eb27 version packages lib@2.3.3-alpha.3 2021-10-15 11:19:53 +13:00
Jack Kavanagh
7856524a96
distinguish upstreams name in declarative config (#4099) 2021-10-13 17:52:40 +00:00
James Gatz
bc35b48f40
Fix/o2k allow whitespace in route paths (#4029)
* Update path param regex to allow for whitespace characters in paths

* Update fixtures for the route path regex
2021-09-20 12:43:39 +02:00
Opender Singh
7ffc391428
add eslint rules for semi colons (#3989)
* add rules for semi colons

* run lint fix

* remove invalid eslint disable
2021-09-01 10:50:26 -04:00
Opender Singh
59827aad84 Merge branch 'release/2021.5.1' into develop 2021-08-31 09:52:45 +12:00
David Marby
d4048846aa version packages lib@2.3.2 2021-08-30 22:47:18 +02:00
Dimitri Mitropoulos
422d5a809c
adds markdown linting (#3931) 2021-08-27 15:44:01 +12:00
Opender Singh
376ac03703 version packages lib@2.3.1 2021-08-26 08:15:00 +12:00
Opender Singh
1dd421e4f0 version packages lib@2.3.1-alpha.2 2021-08-16 12:59:26 +12:00
Dimitri Mitropoulos
407432aa02
adds eslint-config-helpers (#3912) 2021-08-12 18:01:54 -04:00
Opender Singh
0debbe9c9c version packages lib@2.3.1-alpha.1 2021-08-10 16:17:55 +12:00
Dimitri Mitropoulos
0178533e52
Feat/eslint import order (#3782) 2021-07-23 11:04:56 +12:00
John Chadwick
b07cd1cf16
Upgrade Electron to 11.2.3. (#3798)
* Upgrade Electron from 9.3.5 to 11.2.3.

* bump version

* update preid to alpha

* version packages lib@2.3.1-alpha.0

* Downgrade electron-builder to 22.11.3.

We tried to upgrade electron-builder to 22.11.7, but this fails
because electron-builder 22.11.4 introduces imports into fs/promises.
This module is only available in Node 14+, so we have to stick to
22.11.3 until we update to Electron 12.

* Revert npm script changes from alpha release.

Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-07-16 13:35:32 -07:00
Opender Singh
3998e8b489 Merge branch 'release/2021.4.0-stable' into develop 2021-06-30 11:03:39 +12:00
Opender Singh
c2c41f3d84 version packages lib@2.3.0 2021-06-29 21:44:26 +12:00
Opender Singh
af8e59b4ea version packages lib@2.3.0-beta.4 2021-06-23 15:54:20 +12:00
Dimitri Mitropoulos
7861d7a505 [o2k] all Kong entities have should tags (#3428) 2021-06-23 11:28:59 +12:00
Dimitri Mitropoulos
3ba7b880b6
[o2k] all Kong entities have should tags (#3428) 2021-06-02 08:55:31 -04:00
Opender Singh
d7b630f17b
Add formatting ESLint rules (#3425)
* add rules

* run lint:fix

* quick manual fix for lint errors

* indent fix

* add jsx prop multiline

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2021-05-27 14:00:32 -04:00
Dimitri Mitropoulos
2bf4586dc7
[o2k] copy plugin objects as is (and respect enabled flag) (#3419)
* clears all errors in tests, enables overrides for spec generators

* removes copy/pasta in tests, uses spec generator, removes useless async

continuing from the last commit, but separated out for easier review

* consolidates openapi x-kong extension to one place, uses consistently

these were used for some things, not used for others, exported in some places, not exported in others.  now it's uniform and we can look up references for each type.

* adds failing test for ticket

* only adds `enabled` where it was specified

* allows adding passing top-level properties to config

now, the line that was there specifically for `config` is redundant.

* adds tags to test result per review feedback

* removes unnecessary generic

for some reason, this didn't error before, but now it is.

* removes unnecessary argument

this failed on the CI with:

openapi-2-kong: FAIL src/generate.test.ts
openapi-2-kong:   ● Test suite failed to run
openapi-2-kong:     src/generate.test.ts:90:58 - error TS2769: No overload matches this call.
openapi-2-kong:       Overload 1 of 2, '(src: string, options?: (ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined): any', gave the following error.
openapi-2-kong:         Argument of type '"utf8"' is not assignable to parameter of type '(ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined'.
openapi-2-kong:       Overload 2 of 2, '(src: string, reviver: Reviver, options?: (ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined): any', gave the following error.
openapi-2-kong:         Argument of type 'string' is not assignable to parameter of type 'Reviver'.
openapi-2-kong:     90       const parsedSpec = YAML.parse(dcFixtureFileString, 'utf8');
openapi-2-kong:                                                                 ~~~~~~
openapi-2-kong:     src/generate.test.ts💯59 - error TS2769: No overload matches this call.
openapi-2-kong:       Overload 1 of 2, '(src: string, options?: (ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined): any', gave the following error.
openapi-2-kong:         Argument of type '"utf8"' is not assignable to parameter of type '(ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined'.
openapi-2-kong:       Overload 2 of 2, '(src: string, reviver: Reviver, options?: (ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined): any', gave the following error.
openapi-2-kong:         Argument of type 'string' is not assignable to parameter of type 'Reviver'.
openapi-2-kong:     100       const parsedSpec = YAML.parse(k8sFixtureFileString, 'utf8');
2021-05-25 16:05:52 -04:00
Josh Soref
9006babd38
fix spelling (#2976) 2021-05-25 12:16:43 -04:00
Dimitri Mitropoulos
5cd52b2bc9
Fix: o2k optional tags signatures (#3416)
* removes unnecessary plugin indirection

there is no reason to have functions that literally call other functions with the same argument.  well... maybe not _no_ reason, but the one valid reason I can think of (to satisfy an abstraction's constraints) is not met here.  This serves no documentational value either because it creates indirection rather than showing what it's really doing (which is, to generate a plugin).

* reworks generatePlugins and generatePlugin signatures

adds Entry, removes optional `tags`, curries

* use option parameter syntax for generateRequestValidatorPlugin

also, many errors were occurring for OA3Operation.responses not being passed over and over again, leading me to believe it's valid to do so.

* ensures `generateOperationPlugins` has tags, uses option parameter

* removes flowtype comments

* updates readme examples along with readme function signatures

parseSpec and generate were `async` but never awaited

Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-25 08:26:42 -04:00
Opender Singh
2fe35d5314 update lockfile 2021-05-25 19:08:43 +12:00
Opender Singh
88ed96fc47 merge release branch with develop and resolve conflicts 2021-05-25 09:30:09 +12:00
Dimitri Mitropoulos
8fb789f14d
[o2k] fix: kubernetes TLS implementation is (very) wrong (#3410)
* updates Kubernetes types to actually match Kuberenetes Ingress/v1beta1 API

* checks type of result in tests

among other cosmetic changes

* enables strict mode in o2k (but leaves bug it uncovered that this PR fixes)

I really do need this to complete the task at hand.  For example, there was an existing error in `ingressDocWithOverride`:

```
Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.ts(2322)
kubernetes-config.ts(36, 3): The expected type comes from property 'path' which is declared here on type 'K8sHTTPIngressPath'
```

That is caught only by strict mode.  This is literally what I am fixing in this PR, so it seems like as good a time as any.  Thankfully, only took me ~30 minutes to do because it was already super close.

* fixtures for `kong-for-kubernetes`

* index exporters for actual exports

when I made these files, I didn't understand that the lower-level helpers are not actually exported by the library, therefore there's no reason to have these index.ts files.

Furthermore, the types file could use it's own for the same reason, because those types _are_ actually exported.

* fixes bug: TLS is now an array and a child of K8sIngress.spec

* updates 'yaml'

for some reason I cannot explain, suddenly the CI is failing constantly because of this package.  https://github.com/Kong/insomnia/runs/2639615988

The only `yaml` exports we use in`o2k` are `parse` and `stringify` and we don't re-export it in any way.  Therefore, we should be safe to update it (many other projects in the monorepo are on different versions anyway).  This recent version is written purely in TypeScript, so we don't need the types packages anymore.

* adds a few more docs
2021-05-24 08:23:51 -04:00
Dimitri Mitropoulos
3605bc17cc
Feat/o2k improvements (#3396)
* makes this `yaml` import match all others

for better or for worse, until we upgrade `YAML` (it's now written in TypeScript) we should probably aim for consistency.

* adds overloads so that types of package exports

it would be FAR preferable to use an object with the arguments instead because then we don't have to fall into all the traps that come with overloads, but I am avoiding changing the actual call signature of these function.

* fixes and updates types

* corrects mispelling

* removes shim types and exports actual types from openapi-2-kong

we had everything in place for the rest of the build pipeline to consume these types, but were missing the main exports at the root index.ts file

* use actual openapi-2-kong types now that they're available

* use existing variable for filePath

* extracts o2k-specific helper data to live in o2k

evidently, this data is useful for the usage of o2k, therefore o2k should be the thing exporting it.

* use KubernetesManifest for name of kubernetes manifest union

when first naming this, I didn't have much more context than the property name (documents), so after taking a look,  it's clear that these are kubernetes manifests

* removes attempt at correctly typing overloads

I will return to this, and so I'm leaving it here in a commit rather than squashing it out, but I can't see a way to get it to work without changing the signature in a big way.

* fixes error (now that there are yaml types)

* makes `K8s` vs `Kubernetes` type terminology consistent

part of the motivation for this is that there are significant things in common between the two kinds of configs, making them closer in form is therefore ideal.

* updates mistake in name per review feedback
2021-05-19 22:49:50 -04:00
David Marby
34b8c17260 publish npm packages lib@2.3.0-beta.2 2021-05-19 14:50:58 +02:00
David Marby
65a53f45fd Fix .npmignore 2021-05-19 14:37:56 +02:00
Opender Singh
b2040dacd2 publish npm packages lib@2.3.0-beta.0 2021-05-19 09:21:52 +12:00
Dimitri Mitropoulos
5fe277ee02
remove duplication of all jest configs (#3375)
* use jest-preset for all but app

* separate properties that are the same as the preset

for some reason, it doesn't work.  you get:
```
Preset ../../jest-preset.js not found.
```

This needs to be investigated.

* removes unused/unneeded npm script in `app`, `test:jest`
2021-05-13 07:29:02 -04:00
Dimitri Mitropoulos
78c4a18f0b
makes all package.json author fields consistent (#3338)
* makes all package.json author fields consistent

* adds Preston Alvarado as a contributor per review feedback.
2021-05-12 08:31:07 -04:00
Dimitri Mitropoulos
5f4c19da35
[TypeScript] Phase 1 & 2 (#3370)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-12 18:35:00 +12:00
Opender Singh
14ebadd8f9 publish npm packages lib@2.2.35 2021-04-29 08:50:33 +12:00
Opender Singh
2da4fe8471
chore: update o2k docs (#3332)
Co-authored-by: Thijs Schreijer <thijs@thijsschreijer.nl>
2021-04-29 08:33:44 +12:00
Opender Singh
69d7514095
Tags for all of the plugins! (#3328)
* feat: add tags to regular plugins

* feat: plugin support for request validator plugins

* feat: add tags to security plugins

* feat: security plugins detecting the expected property

* chore: don't force publish and bump version

* publish npm packages lib@2.2.35-beta.4
2021-04-28 08:14:49 +12:00
mikaello
05b5c3d041
Add metadata fields to openapi-2-kong package.json (#2802)
* add metadata fields to openapi-2-kong package.json

* fix issue url in openapi-2-kong package.json

Format according to npm docs: https://docs.npmjs.com/cli/v6/configuring-npm/package-json#bugs

* improve repo-field in openapi-2-kong package.json

See structure in NPM docs: https://docs.npmjs.com/cli/v6/configuring-npm/package-json#repository

* Update packages/openapi-2-kong/package.json

Co-authored-by: Opender Singh <opender.singh@konghq.com>
Co-authored-by: Opender Singh <opender94@gmail.com>
2021-04-27 19:08:42 +12:00
Thijs Schreijer
28db994bb7
[o2k] fix parameter default styles (#3327)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-04-27 13:18:04 +12:00
Thijs Schreijer
a5f67bbb35
[o2k] fix name generation (#3318)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-04-27 13:00:08 +12:00
Thijs Schreijer
84e47da5f2
[o2k] fix targets not getting tags (#3320) 2021-04-27 11:57:09 +12:00
Dimitri Mitropoulos
cde2516a8b
strip_path explicit support, and x-kong-route-defaults support (#3273)
* x-kong-{route, upstream, service}-defaults, strip_path

supports selecting but not merging defaults

Co-authored-by: Thijs Schreijer <thijs@thijsschreijer.nl>
2021-04-26 12:17:02 -04:00
Thijs Schreijer
e4c7ed2629
split url into components on a service (#3314)
* split url into components on a `service`

also fixes a bug to use the upstream name in a service instead
of an actual hostname from the 'servers' block

* fix parseUrl to not return 'null:null'

* do not add targets if there is no hostname

previously a server with just a path; '/some/path' would generate
a target 'null:null'.

* Update packages/openapi-2-kong/src/declarative-config/services.js

* Update packages/openapi-2-kong/src/declarative-config/services.js

Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-04-23 14:41:27 +12:00
Bruno Fusieger
1ea4b4b81f
Fix license metadata (#3233)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-04-23 08:21:22 +12:00
Opender Singh
141685488d publish npm packages lib@2.2.35-beta.3 2021-04-22 11:14:08 +12:00
Opender Singh
6022ea2493 publish npm packages lib@2.2.35-beta.2 2021-04-22 11:10:30 +12:00
Opender Singh
d90328e406 publish npm packages lib@2.2.35-beta.1 2021-04-22 11:01:51 +12:00
Opender Singh
5e71430587 publish npm packages lib@2.2.34-beta.0 2021-04-22 09:43:12 +12:00
Mike Ellan
70738103d7
Custom & default tagging for plugins (#3286)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-04-21 12:34:39 +12:00
Opender Singh
60a3faaa34
Respect request validator plugin defined at the document root and hierarchy of plugin definitions (#3293) 2021-04-20 13:30:17 +12:00
Opender Singh
874f6c9b27
Request validator plugin respects existing properties and generates required ones (#3283) 2021-04-20 13:04:22 +12:00
Thijs Schreijer
40deacb718
fix(o2k) update path param regex to match 1 segment only (#3298)
existing regex '\S+' is equivalent to '[^\s]+' by adding the
'/' character as not allowed, we limit the regex to match only 1 path
segment

This path: "/tracks/{hello}/world/{there}”
Would create: “/tracks/(?<hello>\S+)/world/(?<there>\S+)$”

This path works as expected:
/tracks/xxx/world/yyy
With captures:
  hello: xxx
  there: yyy

This path also works, unexpected:
/tracks/xxx/zzz/world/yyy/andthensome
With captures:
  hello: xxx/zzz
  there: yyy/andthensome

The last one should have matched only a single path segment, but
actually matches multiple.
2021-04-19 19:50:46 +12:00
Mike Ellan
81e16a1c97
parameter style fix (#3256)
Setting parameter style to form if not provided.
2021-04-09 14:56:49 -04:00
Opender Singh
e094a1f678 lib@2.2.33 2021-03-30 10:03:21 +13:00
Mike Ellan
da9ef1a009
Inject custom vars in target servers (#3237) 2021-03-25 09:23:54 -04:00
Opender Singh
5ba91ceb21 lib@2.2.29 2021-03-03 11:12:19 +13:00
Dimitri Mitropoulos
eb4ae99f84
use operationId where possible in o2k generation (#3072)
* use `operationId` if it exists for route name
* adds precedence for x-kong-name usages
2021-02-16 16:34:34 -05:00
Dimitri Mitropoulos
770be1b924
makes all route paths regexes in o2k (with ending markers) (#3066)
* adds jest to openapi-2-kong so tests can run
* removes special case since everything is a regex
* updates tests now that everything is a regex
2021-02-10 10:38:30 -05:00
dependabot[bot]
dd2017d8b8
Bump ini from 1.3.5 to 1.3.8 (#2940) 2020-12-15 05:22:01 +00:00
Opender Singh
f5a0e9eb7c lib@2.2.26 2020-11-26 16:12:14 +13:00
Isaac Moore
474da01295
Add required annotation to Kubernetes config (#2709)
Fixes #2706
2020-10-13 10:32:25 +13:00
Opender Singh
601c6060a4
Update o2k readme examples (#2679) 2020-09-30 19:38:44 +13:00
Opender Singh
6cafe6ae47
Update babelrc to node 12 for all packages (#2670) 2020-09-29 18:33:03 +13:00
Opender Singh
c2d989e1e0 lib@2.2.24 2020-09-22 11:45:33 +12:00
Opender Singh
1b416d8027
Release branch for 2020.4.0 (#2576) 2020-09-15 08:55:18 +12:00
Opender Singh
9af2054ccf lib@2.2.12 2020-07-02 11:29:00 +12:00
Opender Singh
b99228d080 Rename insomnia-cli to insomnia-inso 2020-07-02 11:28:05 +12:00
Opender Singh
d91e6735a7 lib@2.2.11 2020-07-02 11:19:48 +12:00
Opender Singh
85860ce031
Add unit testing to CLI, configurable Mocha reporter (#2311) 2020-06-30 09:54:12 +12:00
Gregory Schier
55be1de2bd lib@2.2.10 2020-06-29 10:51:46 -07:00