Updating an OpenAPI specification

Procedure

  1. Open the Swagger JSON that you are planning to update.
  2. Go to the Swagger Editor.
  3. Copy and paste the contents of the Swagger json into the Swagger Editor left-hand panel.
  4. Make changes to the spec:

    Note: You can use the Insert option to add path items, operation, info, external documentation, tag declaration, and tags to operation, servers and example responses.
    Note: Validation errors will appear in a notification at the top of the right-hand pane.
  5. When editing the JSON is finished, use a JSON validator to ensure its validity. Swagger Editor does not validate JSON linting support, so it's necessary to put it through a linter to validate. You can find JSON validators at: https://jsonlint.com/.
  6. When editing the JSON is finished, copy and paste the contents back into the text editor file.
    Note: Avoid using the File > Save as JSON option in Swagger Editor. This will create a JSON file using two spaces rather than four spaces for tab.