Draft HTTP endpoint examples in ChatGPT
Use a supplied route, parameters and responses to write a static endpoint reference with success and error codes.
中文Install in ChatGPT
A ChatGPT workspace with skill creation enabled. Paste the fictional material below as text.
- In a ChatGPT workspace with skill creation enabled, open Plugins → Skills → Create → Create with editor.
- Create a skill in the editor and adapt the text-only `api-documentation-best-practices` workflow from the pinned GitHub source into its instructions.
- Save the skill, then type @ in a new chat to select it and try the example.
Example task
Draft an endpoint reference for Park events.
service="Park events"; route="GET /events"; optionalParam="day with format YYYY-MM-DD"; defaultLimit=10; errorStatus=400; successStatus=200; success={"events":[{"id":"walk-1"}]}; error={"error":"invalid day"}; access="public"What to check
For `GET /events; day=YYYY-MM-DD; defaultLimit=10`, document the provided 200 event list and 400 date error. Record that the endpoint is public.
Original SKILL.md on GitHub · Updated
Frequently asked question
How can ChatGPT document success and error examples for an HTTP endpoint?
Confirm the method, path, parameter format and access model. Describe the supplied JSON for successful and invalid requests separately.