stacks-blockchain-api icon indicating copy to clipboard operation
stacks-blockchain-api copied to clipboard

Stricter doc schema/type errors

Open zone117x opened this issue 4 years ago • 1 comments

  • Print a warning in the doc type gen for schema objects that are missing a title property.
  • Print a warning in the doc type gen for schema objects that are missing additionalProperties: boolean property.
  • Run an OpenAPI linter on /docs/openapi.yaml.
  • Run a json schema linter on /docs/**/*.schema.json`.

Several openapi/typedoc-client references are problematic due to the above issues.

zone117x avatar Jul 14 '21 19:07 zone117x

@zone117x regarding the first two points, I looked into json-schema-to-typescript. However, they are not providing any global configuration for additionalProperties. Plus, I also looked into jsonlint-cli for their configurations but couldn't find something that would validate schema based on its properties. Therefore, does manually reading every file and checking for title and additionalProperties here, sound a good approach?

With reference to the latter two points, regarding openapi and linter, am I supposed to just run the linter or is there anything other than that to it?

MHassanTariq avatar Nov 09 '21 09:11 MHassanTariq