Closed sabat24 closed 3 years ago
@sabat24 It seems to me that the parameter exported looks bit fuzzy.
"parameters": [
{
}
],
Just curious, what does it represent? In the UI terms, does it mean you tried to add a parameter and emptied it (and not deleted)?
@sabat24 Can you also give fix-example branch a try? It seems working with the schema you provided.
In parameters
section there was some simple key: value
object provided. I removed the body here to not obfuscate the whole resource object. I'll do a check that branch on Monday. Then I can attach also my whole workspace here which is assigned to insomniaExportedInput
variable (2.8MB) with whole source code of my plugin.
@sabat24 can you paste the complete stacktrace here?
It was my fault. That method
await context.data.export.insomnia({
includePrivate: false,
format: 'json',
workspace: models.workspace,
});
returns string
formatted as JSON not a JSON object per se. When I dumped the result of that method I received a JSON object, because my tools converted that response to the JSON object in the fly.
I get the Insomnia workspace data directly from Insomnia and save it into
insomniaExportedInput
variable. Structure seems to be correct:I pasted only one resource just as an example.
Then trying to run that command
let schema = new converter.SchemaPack(insomniaExportedInput, openapiConfig)
I receive following exception: