Kong / Kong/insomnia

Inso Kong Declarative Configuration Generator - Tags generation issue/missing

Open
#5,185 5 comments 0 reactions 0 assignees View on GitHub
B-bug PA-inso PA-openapi-2-kong S-unverified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Expected Behavior

1. Generating kong declarative confguration file from Insomnia Windows or generating from Insomnia Inso CLI provide same configuration files

2. Possibility to add tags by defining them in Swagger openAPI 3.0 file.

According to openapi-2-kong readme, I understand unless I'm mistaken that tags field should be converted :

```
export type ConversionResult = DeclarativeConfigResult | KongForKubernetesResult;

generateFromSpec(
spec: OpenApi3Spec,
type: ConversionResultType,
tags?: string[],
) => ConversionResult
```

### Actual Behavior

1. Generating kong declarative confguration file from Insomnia Windows and generating from Insomnia Inso CLI provide different tags in kong configuration file

Insomnia windows provide :
```
"tags": [ "OAS3_import"
],
```
Inso CLI provide :
```
tags:
- OAS3_import
- OAS3file_.yaml
```

2. Tags are not generated from file openAPI 3.0

### Reproduction Steps

1. Use any swagger OpenAPI 3.0 file
2. Generate Kong declarative configuration file from Inso Windows and Inso CLI.
3. Compare result
4. Add tags to openAPI spec file and generate kong declarative configuration file (example using swagger petstore provided by Swagger Editor)

PS : Use latest version for Inso CLI and Inso WIndows.
Inso CLI 3.5
Inso Wndows v2022.5.1

### Is there an existing issue for this?

- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.

### Additional Information

_No response_

### Insomnia Version

2022.5.1

### What operating system are you using?

Windows

### Operating System Version

Windows 10 version 1809 build 17763.3165

### Installation method

Download .exe version for windows

### Last Known Working Insomnia version

none

Contributor guide

Open the contributing guide

Research direction

Reproduce the discrepancy with the Swagger Petstore OpenAPI 3.0 file, comparing output from Insomnia Windows and the Inso CLI. Start with the openapi-2-kong readme and the generateFromSpec entry point; done means both clients produce consistent tags and OpenAPI tags are represented in the generated Kong declarative configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api, cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.