API Schema Generation from Source Code in Snyk API & Web
Snyk API & Web can now automatically obtain and generate OpenAPI schemas directly from your source code repositories. When adding an OpenAPI target, you can select the new Repository option instead of providing a schema URL or file. The product will:
Search for existing OpenAPI/Swagger files in your repository
Generate candidate schemas from your source code (if AI usage is enabled)
Email you when schemas are ready for review
Allow you to download schemas, review them, and link a schema to enable scanning
Requirements:
Snyk integration must be configured at Settings > Integrations > Snyk
Your repository must be accessible through the Snyk integration
API security testing in Snyk API & Web has always required a valid schema, but oftentimes, specifications are missing, stale, or never checked in. This creates significant onboarding friction: teams spend hours to days manually writing OpenAPI specs for each API, and many skip API security testing entirely because the schema barrier is too high.
By automating schema retrieval and generation, we remove the primary barrier to API target onboarding, allowing you to scan APIs that were previously too expensive or time-consuming to document.
With this change, you can forget about manual OpenAPI spec creation. Point to your repository, wait for candidate schemas to be surfaced, review them, and start scanning in minutes. No manual spec authoring required.
To learn more, visit Configure an API target without a schema file and Troubleshoot API schema retrieval and generation in our user documentation.
Ana Pascoal | Product Manager