Skip to content

Support YAML files for OpenAPI Specs

Problem

According to the OpenAPI specification a openapi definition can be defined in yaml or json. However API fuzzing only accepts a json format.

The swagger online editor can easily convert from json to yaml, but defaults to YAML. Users may prefer to work in YAML as a result.

Proposal

Allow a user to specify the specification in YAML or JSON format.

Tasks:

  1. Verify NSwag library supports yaml
  2. Update validation performed by worker-entry to support yaml for OpenAPI specifications
  3. Update runner as needed to support yaml for OpenAPI
  4. Testing
    1. Add unit tests for runner in c#
      1. OpenAPI YAML for v2.0, v3.0
    2. Add integration test for worker-entry that uses yaml
      1. OpenAPI YAML for v2.0, v3.0 (using UTF-8-BOM)
    3. Add e2e test that uses yaml
      1. openapi-v2-yaml
      2. openapi-v3-yaml
  5. Publish new container
  6. Update documentation to reflect either format is supported. MR !61751 (merged)
    1. API Fuzzing
    2. DAST API

MR !508

Edited by Michael Eddington