A small ASP.NET Core Web API demo built to showcase API contract thinking, structured validation, predictable error handling, and integration readiness for other developers or teams.
This project is intentionally small, but it is designed to demonstrate more than simple CRUD endpoints. It focuses on:
- clear backend API design
- OpenAPI / Swagger documentation
- request and response contract clarity
- rule-based validation
- AI-style quality validation
- structured error handling
- Postman-based testing assets
- integration documentation for API consumers
This demo uses a Support Ticket API to simulate a realistic backend workflow.
POST /api/TicketsGET /api/TicketsGET /api/Tickets/{id}PATCH /api/Tickets/{id}/statusPOST /api/Tickets/validate
This repo is designed to show:
- API contract thinking
- communication clarity for cross-team integration
- predictable validation and response structure
- developer experience awareness
- maintainable validation design inside a single backend service boundary
The project uses two validation layers:
This ensures the request is structurally valid:
- required fields
- valid email format
- allowed priority values
- title and description length
This simulates higher-level support request quality review:
- title too generic
- description too vague
- missing actionable context
- possible spam-like content
This project includes an AI-assisted validation concept, but the first version does not require a real external LLM integration.
The main goal of this project is to demonstrate API design, validation flow, documentation clarity, and integration readiness. Since the backend is built in ASP.NET Core, the validation logic is kept inside the same service boundary for simplicity, consistency, and maintainability.
Adding Python as a separate service in the first version would increase:
- deployment complexity
- cross-service communication overhead
- dependency management
- explanation burden during interviews
For this reason, version 1 uses C#-based validation services.
A real LLM integration is optional, not required for the first version of this demo.
Version 1 focuses on:
- clean API design
- rule-based validation
- mock AI-style quality checks
- structured request and response contracts
- predictable error handling
This keeps the demo:
- stable
- free to run
- easier to explain
- easier to test
The validation design is intended to support a future upgrade to a real AI provider through an interface-based validation service, without changing the external API contract.
- Client sends draft ticket content to
POST /api/Tickets/validate - API returns validation issues and suggestions
- If the draft is acceptable, client submits the final ticket to
POST /api/Tickets - If issues exist, the client shows suggestions before final submission
- ASP.NET Core Web API
- C#
- Swagger / OpenAPI
- Postman
docs/
postman/
src/ApiContractDemo/
docs/simple-explanation.md— plain-language project explanationdocs/ai-validation-design.md— validation design rationaledocs/api-spec-draft.md— request/response contract draftdocs/integration-guide.md— client integration flowdocs/day1-setup.md— project setup notes
dotnet restore
dotnet runYou can test the API in two ways:
Run the project and open the Swagger UI to view the endpoints and execute requests interactively.
A Postman collection is included under postman/ApiContractDemo.postman_collection.json.
Suggested folders:
TicketsValidation
This stable version intentionally avoids Swagger example filters and other extra package-based enhancements. The current priority is a clean, working API contract demo with reliable OpenAPI output, Postman assets, and clear validation flow.
- in-memory storage only
- no authentication
- no persistent audit history
- AI-style validation is simulated, not provider-backed
- no automated test suite yet
- replace mock AI validation with a real provider
- add SQL persistence
- add authentication
- add API versioning
- add Docker support
- deploy to Azure App Service