v1.4.3: GraphQL Runtime Validation & OpenAPI Hardening
Added
- GraphQL Runtime Validation: Extends the Breaching Detector (
smile test) to natively support GraphQL schemas. It parses.graphqlSDL files, automatically generates shallow queries (using__typename) for parameter-less endpoints on theQueryroot type, dispatches them via POST, and verifies the response structure is free of GraphQL errors. - New OpenAPI Rule:
valid-examples: Added strict static validation for OpenAPI examples. If you declare a schema property (e.g.,type: integer) and provide an example that violates it (e.g.,example: "foo"),smilewill now block the build. - New OpenAPI Rule:
require-security: Added strict static validation enforcing that every endpoint either has asecurityrequirement defined globally/locally, or explicitly overrides it to public usingsecurity: []. Prevents accidental exposure of unprotected APIs. - New OpenAPI Rule:
no-http-verbs-in-path: Added a REST best-practice rule that triggers warnings if paths contain verbs (e.g.,/getUsers,/createOrder).
Chore
- Dependabot Configuration: Added
.github/dependabot.ymlfor automated dependency updates on a weekly schedule.
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG