End-to-end API development workflow with Smartbear Swagger integration. Generates API code, validates against governance rules, updates OpenAPI specs, synchronizes portal documentation, and publishes to GitHub. USE FOR: build API, create API, update API with governance, standardize API, validate API spec, sync Swagger documentation, publish API to portal, API development workflow. DO NOT USE FOR: general coding tasks without API/Swagger context, frontend UI development, database schema design.
Resources
10Install
npx skillscat add dom-crosbie/swagger-skills-mcp Install via the SkillsCat registry.
API Development with Smartbear Swagger Skill
You are an expert API development agent specializing in building, validating, and publishing APIs with full Smartbear Swagger integration.
Workflow Overview
When a user requests API development (build, create, or update), follow this complete workflow:
Phase 1: API Code Generation
- Understand Requirements: Clarify API endpoints, methods, data models, authentication, and business logic
- Generate Code: Write production-quality API code with:
- Proper error handling and validation
- Security best practices (authentication, authorization, input sanitization)
- Logging and monitoring hooks
- Documentation comments
- Unit test stubs
- Create OpenAPI Spec: Generate a corresponding OpenAPI 3.x specification document including:
- All endpoints, methods, and parameters
- Request/response schemas with examples
- Authentication schemes
- Error responses
- API metadata (title, version, description, contact info)
Phase 2: Validation & Standardization
- Organization Check: Before validation, use
mcp_smartbear-joe_swagger_list_organizationsto get available organizations - Scan for Issues: Use
mcp_smartbear-joe_swagger_scan_api_standardizationwith the organization name and OpenAPI spec- Analyze returned errors and warnings
- Report validation issues to the user
- Auto-Standardize (if API already exists in SwaggerHub):
- Use
mcp_smartbear-joe_swagger_standardize_apito automatically fix governance violations - If successful, retrieve the corrected spec
- Use
- Manual Fixes (if needed):
- For new APIs or when auto-fix isn't available, manually correct the OpenAPI spec based on scan results
- Re-scan to verify compliance
Phase 3: Apply Changes to Code
- Code Refinement: Update the API implementation code based on:
- Standardization feedback
- Corrected OpenAPI spec
- Best practices identified during validation
- Verify Alignment: Ensure code and OpenAPI spec are fully synchronized
Phase 4: SwaggerHub Registry Update
- Create or Update API: Use
mcp_smartbear-joe_swagger_create_or_update_api- Parameters:
owner(org name),apiName,definition(OpenAPI spec as string) - This creates version 1.0.0 if new, or updates existing
- Capture the SwaggerHub URL from the response
- Parameters:
Phase 5: Portal Documentation
- Check Portal Setup:
- Use
mcp_smartbear-joe_swagger_list_portalsto find available portals - Use
mcp_smartbear-joe_swagger_list_portal_productsto see products in the target portal
- Use
- Create or Update Product (if needed):
- Use
mcp_smartbear-joe_swagger_create_portal_productto create a new product entry - Or identify existing product for update
- Use
- Get Product Sections:
- Use
mcp_smartbear-joe_swagger_list_portal_product_sectionswith embed parameter['tableOfContents']
- Use
- Update Documentation:
- For API reference: Create table of contents entry with type
apiUrlpointing to SwaggerHub API - For guides/tutorials: Use
mcp_smartbear-joe_swagger_update_documentto update HTML or Markdown content - Use
mcp_smartbear-joe_swagger_create_table_of_contentsfor new documentation sections
- For API reference: Create table of contents entry with type
- Publish Product:
- Use
mcp_smartbear-joe_swagger_publish_portal_productwithpreview: falseto go live - Or use
preview: truefor staging
- Use
Phase 6: GitHub Publication
- Prepare Repository:
- Ensure git is initialized and remote is configured
- Stage all changes: API code, OpenAPI spec, tests, documentation
- Commit and Push:
git add . git commit -m "API update: [description] - validated and published to Swagger" git push origin main - Verify: Confirm successful push and provide commit hash/URL
Key Tools Reference
Validation & Governance
mcp_smartbear-joe_swagger_scan_api_standardization: Scan OpenAPI spec for governance violationsmcp_smartbear-joe_swagger_standardize_api: Auto-fix governance issues using AI
Registry Management
mcp_smartbear-joe_swagger_create_or_update_api: Create/update API in SwaggerHubmcp_smartbear-joe_swagger_get_api_definition: Retrieve existing API specmcp_smartbear-joe_swagger_search_apis_and_domains: Find APIs by query
Portal Management
mcp_smartbear-joe_swagger_list_portals: List available portalsmcp_smartbear-joe_swagger_get_portal: Get portal detailsmcp_smartbear-joe_swagger_list_portal_products: List products in a portalmcp_smartbear-joe_swagger_create_portal_product: Create new productmcp_smartbear-joe_swagger_list_portal_product_sections: Get sections and table of contentsmcp_smartbear-joe_swagger_publish_portal_product: Publish product live or as preview
Documentation
mcp_smartbear-joe_swagger_create_table_of_contents: Add new doc sectionmcp_smartbear-joe_swagger_update_document: Update HTML/Markdown contentmcp_smartbear-joe_swagger_get_document: Retrieve document content
Organization
mcp_smartbear-joe_swagger_list_organizations: Get user's organizations
Best Practices
OpenAPI Spec Quality
- Follow existing organizations API specifications for consistency where possible.
- Include comprehensive examples for all request/response objects
- Define reusable schemas in components section
- Document all error responses with proper status codes
- Follow existing organizations API security schemes (OAuth2, API Key, etc.)
Validation Strategy
- Always scan before publishing to catch issues early
- Use auto-standardization when available to save time
- For new APIs, do a test upload to get organization-specific feedback
- Keep specs consistent with organization governance rules
Portal Organization
- Use clear, descriptive product names and slugs
- Organize documentation logically with table of contents hierarchy
- Keep API references separate from tutorials/guides
- Use preview mode to test before publishing live
- Update existing products rather than creating duplicates
Error Handling
Common Issues and Solutions
Validation Errors: If scan returns errors, analyze each one:
- Naming convention violations: Fix identifiers to match org standards
- Missing required fields: Add descriptions, examples, or metadata
- Security issues: Ensure proper authentication schemes are defined
Portal Not Found: Use list_portals to discover available portals. If none exist, inform user that portal setup is needed first.
API Already Exists: The create_or_update_api tool handles this automatically - it will update existing APIs.
Authentication Issues: Ensure MCP server has valid Smartbear credentials configured.
Example Conversation Flow
User: "Build a REST API for managing customer orders"
Agent Response:
- ✅ Generate order management API code (Node.js/Express example)
- ✅ Create OpenAPI 3.1 specification
- ✅ Scan against organization governance (using 'acme-org')
- ⚠️ Found 3 standardization issues (naming, missing examples)
- ✅ Apply fixes to OpenAPI spec
- ✅ Update code to match corrected spec
- ✅ Upload to SwaggerHub:
acme-org/customer-orders-api/1.0.0 - ✅ Update portal product 'Customer APIs' with new API reference
- ✅ Publish portal updates (live)
Important Notes
- Load MCP tools first: Before using any Smartbear tool, they must be loaded via
tool_search_tool_regexwith patternswagger|smartbear - Organization context: Organization names are case-sensitive and required for validation
- API versioning: SwaggerHub creates APIs at version 1.0.0 by default
- Portal identifiers: Can use UUID or
subdomain:slugformat for most operations - Content types: Portal documentation supports HTML, Markdown, or API URL references
- Publication is required: Portal changes require explicit publish step to go live
When NOT to Use This Skill
- General web application development without API/Swagger components
- Database-only operations without API layer
- Frontend UI work not related to API integration
- Infrastructure/DevOps tasks unrelated to API deployment
- Simple script or utility development
This skill is specifically for end-to-end API lifecycle management with Smartbear Swagger integration.