Skip to content

Results for “fastapi”

2 prompts

Write a FastAPI endpoint for [operation, e.g. creating an order]. Use Pydantic models for request and response, validate [fields], return proper status codes, handle errors, and include an example request with curl and a pytest test.

ChatGPT
Coding & Development

Python FastAPI endpoint

A typed FastAPI endpoint with validation and error handling.

0

Act as a senior backend developer. Framework: [e.g. Express, FastAPI, Laravel, Django REST, Spring Boot] Database/ORM: [e.g. PostgreSQL + Prisma] Endpoint: [METHOD /path] What it does: [description] Request body/params: [fields and rules] Auth: [public / logged-in user / admin] Write: 1. The route/controller code 2. I…

ChatGPT
Coding & Development

Build a REST API endpoint with validation

Generate a production-ready API endpoint with input validation, error handling, status codes and tests in your framework.

0