Back to all reviewers

validate configuration schemas

denoland/deno
Based on 2 comments
Json

Configuration schemas should be actively validated, well-documented, and kept up-to-date through automated testing. Use appropriate schema types (enums vs strings) based on whether values are constrained, provide comprehensive descriptions that include examples and supported formats, and implement automated tests to ensure schemas remain current with code...

Configurations Json

Reviewer Prompt

Configuration schemas should be actively validated, well-documented, and kept up-to-date through automated testing. Use appropriate schema types (enums vs strings) based on whether values are constrained, provide comprehensive descriptions that include examples and supported formats, and implement automated tests to ensure schemas remain current with code changes.

For example, instead of a generic string type:

"items": {
  "type": "string"
}

Use descriptive schemas with proper validation:

"plugins": {
  "type": "array", 
  "description": "UNSTABLE: List of plugins to load. These can be paths, npm or jsr specifiers",
  "items": {
    "oneOf": [
      {"type": "string", "format": "uri"},
      {"enum": ["known-plugin-1", "known-plugin-2"]}
    ]
  }
}

Add automated tests that verify schema accuracy against actual implementation to prevent drift between documentation and behavior.

2
Comments Analyzed
Json
Primary Language
Configurations
Category

Source Discussions