One of the most important properties that Spectral does not possess is tagging. OpenAPI tags applied at the operational level allow for a simple yet powerful way to organize and group your API resources, and when you extend the Spectral specification adding in tags, you find you will discover a new found super power in grouping and executing rules. This is an experimental aspects of using clusters and groups of API governance rules to run against OpenAPI, JSON Schema, APIs.json, and other artifacts. When you begin to cluster and group Spectral rules as part of design-time, build-time, or real-time always on API governance, some new features begin to emerge, going well beyond just rulesets.
- Sum of Rules - You can begin not just rating APIs using scores applied to rules, you can add and subtract them, giving you a new math.
- Good Enough - You have the ability to do the math during enforcement and go that is good enough, leaving some less important work on table.
- Experiences - There is the ability to organize rules based upon the experience of teams producing and consuming APIs over other concerns.
- Order of Concerns - Rules can be organized based upon a sequence of concerns, allowing you to focus on what matters to you first.
- Cognitive Load - With the ability to group rules you can reduce the cognitive load and minimize freaking teams out with volume of tech debt.
Anyone tackling enterprise API governance understands the sheer number of rules needed to identify the patterns and anti-patterns accumulated over years of development and accumulation of technical debt. We all need help. A lot of help. Something simple as tagging can give us a new way to dynamically assemble rulesets, and make our rules discoverable and executable by other teams. Having tags on the Spectral rules specification is a good place to start, but this work can then be aligned with existing and ongoing work to improve the tagging for OpenAPI. Just think about what would be possible for API governance when both OpenAPI and Spectral have robust tagging to drive the experience.