Skip to content

Add summary statistics showing X of Y endpoints available #14

@kioku

Description

@kioku

Summary

Add consistent summary statistics across all commands to show how many endpoints are available out of the total, especially when some endpoints are skipped due to unsupported content types.

Current Behavior

The PR description mentions showing "23 of 27 endpoints will be available" but this format is not consistently implemented across the codebase. Currently, warnings show the count of skipped endpoints but not the total context.

Expected Behavior

All relevant commands should show clear statistics about endpoint availability:

During config add:

Warning: Skipping 2 of 27 endpoints with unsupported content types.
25 endpoints will be available for use.

Skipped endpoints:
  - POST /upload (multipart/form-data) - file uploads are not supported
  - POST /avatar (multipart/form-data) - file uploads are not supported

During config list --verbose:

test-api:
  Version: 1.0.0
  Endpoints: 25 of 27 available (2 skipped)
  Skipped endpoints:
    - POST /upload - multipart/form-data not supported
    - POST /avatar - multipart/form-data not supported

During api <name> --describe-json:

Include statistics in the capability manifest:

{
  "endpoints": {
    "total": 27,
    "available": 25,
    "skipped": 2
  }
}

Implementation Notes

  • Add endpoint counting logic to the validation/transformation pipeline
  • Update warning display functions to include total counts
  • Ensure consistency across all user-facing outputs
  • Consider adding this information to the cached spec for efficiency

Context

This enhancement was identified during PR #12 review as a way to improve user understanding of partial spec acceptance.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions