* Fix issue chaining multiple requests
* refactor: use switch to prepare for leveraging exhaustiveness checking
since this will be in TypeScript soon, and this was as topical a time as any to make this change.
* fixes failing test with new behavior (and removes unused `fromResponseTag`)
* fix tests
Co-authored-by: Vincenzo De Petris <vincenzodepetris@gmail.it>
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* INS-674 - First pass at making the send button more visible
* [wip] adds rect for send button
* Update colors in the SVG to match send button
* Update the gRPC send button to also use theme colors
* Adding left margin to send button
Co-authored-by: Eric Reynolds <eric.reynolds@konghq.com>
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* adds redux-devtools back
I had to delete anything under `~/.config/insomnia-app/extensions/lmhkpmbekcpmknklioeibfkpmmfibljd*` to get this to work. Apparently there's some old state left around from the prior version or something when it was broken that prevents a migration?
* improves logging (partly to compensate for bug in upstream)
see: https://github.com/MarshallOfSound/electron-devtools-installer/issues/180
* Fix issue chaining multiple requests
* refactor: use switch to prepare for leveraging exhaustiveness checking
since this will be in TypeScript soon, and this was as topical a time as any to make this change.
* fixes failing test with new behavior (and removes unused `fromResponseTag`)
* fix tests
Co-authored-by: Vincenzo De Petris <vincenzodepetris@gmail.it>
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* INS-674 - First pass at making the send button more visible
* [wip] adds rect for send button
* Update colors in the SVG to match send button
* Update the gRPC send button to also use theme colors
* Adding left margin to send button
Co-authored-by: Eric Reynolds <eric.reynolds@konghq.com>
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* fix: insomnia open dialog for proto directory can't select directories
* uses a named export for selectFileOrFolder
(also, removes original js file from rebase)
* clears error by leveraging exhaustiveness check
* fixes bug: the `name` field is actually for a file filter
see the referenced pull request.
As for the `extensions: ['*']`, there's no reason I can see to include a filter and then tell the filter to then accept everything.
* update selectFileOrFolder mocks
* use switch (for exhaustiveness checking) and type selectedFormat
* removes unnecessary filters from _save_ dialog
from the docs:
> The filters specifies an array of file types that can be displayed
As suspected, this is not needed. A user is free to save it wherever they want.
* adds extension to saved file
not sure why this was missing before, but it appears to have been a bug
* formatting updates
best to "ignore whitespace" for this commit. I did this with the hope of using the `ThunkAction` type from `redux-thunk`, but once I got them all looking good and started adding the type I quickly learned there's quite a bit more work to do in this area before we can have such a thing. I therefore opted to just call it a day at that and take the (no-op) formatting changes and typings.
* removes remaining name filters from save dialogs
same reason as the 2nd to prior commit - they cause the bug
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* 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');
* 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>