Skip to content

registry compute

shrutiparabgoogle edited this page Jan 26, 2023 · 9 revisions

Registry compute command offers a variety of operations that can be run on the API information stored in the registry. Some examples include computing lint results (which we call the conformance report), computing scores, etc. More details in in subsequent headings.

registry compute complexity

Compute complexity metrics of API specs

registry compute conformance

Compute lint results for API specs API style guides can be stored in the registry in a structured format described in Schema for API Style Guides.

With registry compute conformance, the registry tool checks conformance of an API spec with the appropriate API style guides. registry compute conformance uses a plugin interface that by convention, will use a plugin named registry-lint-api-linter to run the linter described in the style guide.

Conformance results are represented with ConformanceReport messages described in conformance_report.proto. These are stored in the registry as artifacts attached to the associated API specs.

Conformance is summarized with scores that are computed based on the conformance reports. Score Definitions are stored at the top level of a project and are used by registry compute score to compute Score values associated with specs. Scores can be grouped together for display in ScoreCards that are computed automatically using ScoreCard Definitions.

For more discussion, watch Incenting Better APIs with API Scoreboards - Shruti Parab, Google from the 2022 API Specifications Conference.

registry compute lint

Soon to be deprecated, please check compute conformance command.
Compute lint results for API specs

registry compute lintstats

Soon to be deprecated, please check compute score command.
Compute summaries of linter runs

registry compute score

Compute scores for APIs and API specs

registry compute scorecard

Compute score cards for APIs and API specs

registry compute vocabulary

Compute vocabularies of API specs