Skip to content

[API-Processor] Support removeOasExtensions build task #6

@iugaidiana

Description

@iugaidiana
  1. The builder shall be able to removeOasExtensions build task, which shall remove OpenAPI extensions and their values from one or multiple OpenAPI specifications.
    • Builder shall be able to remove OpenAPI extensions only for the following document types: openapi-3-1, openapi-3-0, openapi-2-0
  2. For the existing build tasks - reducedSourceSpecifications and mergedSpecification, the builder shall support new flag removeOasExtensions (boolean). If removeOasExtensions = true, the system shall remove OAS extensions and their values from the resulted OAS specifications (specs after reducing source specs or after merge specs).
  3. The builder shall remove all OpenAPI extensions excluding the list of allowed of OAS extensions.
    • List of allowed list of OAS extensions will be provided in build config.
    • If list of allowed of OAS extensions is empty, then all OAS extensions shall be removed.
  4. If found OAS extension is object, then builder shall remove entire object with all child extensions.
  5. If found OAS extension is array, then builder shall remove entire array with all values.
  6. The builder shall search for OAS extensions to delete only on the first level of OAS extensions, i.e. child extension cannot be removed separately from its parent extension.
  7. The builder shall search for OAS extensions only in places allowed by OpenAPI specifications. If some OAS extension is specified in the place which is not allowed by OAS specification, then the builder shall skip (i.e. not delete) such extension.

Metadata

Metadata

Labels

No labels
No labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions