question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin extension 'enabled' not respected in OpenAPI config

See original GitHub issue

To Reproduce

Add a plugin extension similar to the following to an OAI spec:

      x-kong-plugin-cors:
        enabled: false
        config:
          origins: 
            - "*"
          credentials: false
          preflight_continue: false

Then run inso generate config path/to/file.yml. Type is not important, as both output formats have the same issue.

Expected

Since enabled: false is present, it would either be present and disabled or not present in the generated output at all.

Actual

The same output is generated, regardless of whether enabled is true or false.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
HarryETcommented, Dec 1, 2021

Unfortunately I’m not at a computer right now but I can send one through in the next 24h!

That would be awesome, thanks. I’ll try make one myself but if that fails ill wait for yours 😃

1reaction
Tieskecommented, Nov 27, 2021

since this is a valid property for Kong, I think it should be valid to set it in the OAS doc as well. Which then results in the plugin being added to the generated config, with the property set to false.

My 2cts

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugins - OpenAPI Generator
This gradle plugin offers a declarative DSL via extensions (these are Gradle project extensions). These map almost fully 1:1 with the options ...
Read more >
[BUG][openapi-generator-maven-plugin] importmapping not ...
The "importMappings" seem to have no effect with version 5.4.0. With version 5.3.1 the below configuration resulted in a "StreamingResponseBody" ...
Read more >
OpenAPI Specification - Version 3.0.3 - Swagger
This object MAY be extended with Specification Extensions. Components Object. Holds a set of reusable objects for different aspects of the OAS. All...
Read more >
springdoc-openapi v2.0.2
springdoc-openapi works by examining an application at runtime to infer API semantics based on spring configurations, class structure and ...
Read more >
OpenAPI.Tools
Karate-IDE - Generates KarateDSL Tests and Mocks from OpenAPI 3.0 documents and so you can quickly test/explore your API. VSCode Extension, ❌, ✓,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found