Back to all reviewers

Document data constraints

langfuse/langfuse
Based on 3 comments
Yaml

Explicitly document all input and output constraints directly in API definitions. For inputs, specify validation rules such as length limits, character restrictions, and value ranges. For outputs, detail the exact format of returned data structures, including array ordering, boundary conditions (inclusive/exclusive), and semantic meanings of values. This...

API Yaml

Reviewer Prompt

Explicitly document all input and output constraints directly in API definitions. For inputs, specify validation rules such as length limits, character restrictions, and value ranges. For outputs, detail the exact format of returned data structures, including array ordering, boundary conditions (inclusive/exclusive), and semantic meanings of values. This practice improves API clarity and reduces integration errors.

Example (for API responses):

metrics:
  properties:
    data:
      type: array<array<number>>
      docs: |
        Histograms will return an array with [lower, upper, height] tuples, 
        where lower is inclusive, upper is exclusive, and bins are sorted by lower bound.

Example (for API requests):

request:
  body:
    properties:
      name:
        type: string
        docs: Project name (must be between 3-30 characters)
3
Comments Analyzed
Yaml
Primary Language
API
Category

Source Discussions