Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide support for OpenAPI 3.1.0 #2785

Closed
wants to merge 37 commits into from
Closed

Provide support for OpenAPI 3.1.0 #2785

wants to merge 37 commits into from

Conversation

char0n
Copy link
Member

@char0n char0n commented Jan 23, 2023

The goal of this issue to introduce OpenAPI 3.1.0 support to the swagger-client. This support will come via ApiDOM integration.

stateDiagram-v2
    state "Swagger Client" as SwaggerClient
    state "HTTP Client" as SwaggerClientHTTPClient
    state "JSON Parser" as SwaggerClientJSONParser
    state "YALM 1.2 Parser" as SwaggerClientYALMParser
    
    state ApiDOM
    state "ApiDOM resolver plugin" as ApiDOMSwaggerClientResolverPlugin
    state "ApiDOM JSON parser plugin" as ApiDOMSwaggerClientJSONParserPlugin
    state "ApiDOM OpenAPI 3.1 JSON parser plugin" as ApiDOMSwaggerClientJSONOpenAPI31ParserPlugin
    state "ApiDOM YAML Parser plugin" as ApiDOMSwaggerClientYAMLParserlugin
    state "ApiDOM OpenAPI 3.1 YAML Parser plugin" as ApiDOMSwaggerClientYAMLOpenAPI31Parserlugin
    state "ApiDOM OpenAPI 3.1 normalization" as ApiDOMOpenAPI31Normalization
    state "ApiDOM OpenAPI 3.1 dereference strategy" as ApiDOMOpenAPI31DereferenceStrategy

    state "Meta patches" as ApiDOMOpenAPI31DereferenceStrategyMetaPatches
    state "Circular structures" as ApiDOMOpenAPI31DereferenceStrategyCircularStructures
    state "Parameter Macro" as ApiDOMOpenAPI31DereferenceStrategyParameterMacro
    state "Model Property Macro" as ApiDOMOpenAPI31DereferenceStrategyModelPropertyMacro
    state "Strict/Non-Strict mode (allOf)" as ApiDOMOpenAPI31DereferenceStrategyMode

    SwaggerClient --> SwaggerClientHTTPClient
    SwaggerClient --> SwaggerClientJSONParser
    SwaggerClient --> SwaggerClientYALMParser

    SwaggerClientHTTPClient --> ApiDOMSwaggerClientResolverPlugin
    SwaggerClientJSONParser --> ApiDOMSwaggerClientJSONParserPlugin
    SwaggerClientJSONParser --> ApiDOMSwaggerClientJSONOpenAPI31ParserPlugin
    SwaggerClientYALMParser --> ApiDOMSwaggerClientYAMLParserlugin
    SwaggerClientYALMParser --> ApiDOMSwaggerClientYAMLOpenAPI31Parserlugin

    ApiDOMOpenAPI31DereferenceStrategyMetaPatches --> ApiDOMOpenAPI31DereferenceStrategy
    ApiDOMOpenAPI31DereferenceStrategyCircularStructures --> ApiDOMOpenAPI31DereferenceStrategy
    ApiDOMOpenAPI31DereferenceStrategyParameterMacro --> ApiDOMOpenAPI31DereferenceStrategy
    ApiDOMOpenAPI31DereferenceStrategyModelPropertyMacro --> ApiDOMOpenAPI31DereferenceStrategy
    ApiDOMOpenAPI31DereferenceStrategyMode --> ApiDOMOpenAPI31DereferenceStrategy

    ApiDOM --> SwaggerClient
    ApiDOMOpenAPI31Normalization --> ApiDOM
    ApiDOMSwaggerClientResolverPlugin --> ApiDOM
    ApiDOMSwaggerClientJSONParserPlugin --> ApiDOM
    ApiDOMSwaggerClientJSONOpenAPI31ParserPlugin --> ApiDOM
    ApiDOMSwaggerClientYAMLParserlugin --> ApiDOM
    ApiDOMSwaggerClientYAMLOpenAPI31Parserlugin --> ApiDOM
    ApiDOMOpenAPI31DereferenceStrategy --> ApiDOM
Loading

TODO:


Refs #2718
Refs #2717


Warning

Superseded by #2786

char0n added 30 commits January 23, 2023 12:36
This will allow to use optional chaining and other
JavaScript advanced features.

Refs #2717
Node.js =12.20.0 added support for exports field.
Node.js =12.19.0 added support for imports field.

Both of these fields are used by integrated ApiDOM.

[email protected] doesn't yet support package.json imports
field. Next version will, more info in:
jestjs/jest#12270.

Refs #2744
Spec object can be provided instead of URL.
If baseDoc or url options are not provided,
default retrival URL is set to http://smartbear.com

Refs #2754
This change is specific to OpenAPI 3.1.0 resolution
strategy.

Refs #2754
This change is specific to OpenAPI 3.1.0 strategy.

Refs #2753
This change is specific to OpenAPI 3.1.0 strategy.

Refs #2748
@char0n char0n mentioned this pull request Jan 23, 2023
1 task
@char0n char0n force-pushed the openapi-3-1-support branch from ab719a0 to 697ffe5 Compare January 23, 2023 12:27
@char0n char0n closed this Jan 23, 2023
@char0n char0n deleted the openapi-3-1-support branch January 23, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant