Add brewpage.app (hosting, developer_tools)#2492
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive OpenAPI 3.1.0 specification for the BrewPage API, which supports hosting and managing HTML, JSON, KV data, and files. The review feedback highlights several technical improvements: correcting the media type for file uploads to multipart/form-data, allowing structured data in the JSON store, and ensuring error responses use a dedicated ErrorResponse schema. Additionally, the reviewer suggests using explicit application/json media types instead of wildcards and refactoring security headers into standard securitySchemes for better maintainability and idiomatic design.
| type: string | ||
| requestBody: | ||
| content: | ||
| application/json: |
| content: | ||
| application/json: | ||
| schema: | ||
| type: string |
There was a problem hiding this comment.
| content: | ||
| '*/*': | ||
| schema: | ||
| $ref: '#/components/schemas/KvGetResponse' |
There was a problem hiding this comment.
Error responses (403, 404) are currently referencing the success schema KvGetResponse. It is better practice to use a dedicated error schema, such as the ErrorResponse defined in your components, to ensure that clients receive consistent error structures and that auto-generated client code handles these cases correctly. This issue appears in multiple locations throughout the specification.
$ref: '#/components/schemas/ErrorResponse'| '200': | ||
| description: Key value | ||
| content: | ||
| '*/*': |
There was a problem hiding this comment.
Using the wildcard media type */* for structured JSON responses is imprecise. Specifying application/json explicitly is recommended for better compatibility with client generators and to ensure correct parsing by consumers. This pattern is used across most endpoints in the specification.
application/json:| - name: X-Password | ||
| in: header | ||
| description: Access password via header | ||
| required: false | ||
| schema: | ||
| type: string |
There was a problem hiding this comment.
Security headers like X-Password, X-Owner-Token, and X-Admin-Password are defined as individual parameters for every operation. It is more maintainable and idiomatic to define these as securitySchemes in the components section and apply them globally or per-operation using the security field. This also allows tools to better represent the authentication requirements of the API.
API
BrewPage — https://brewpage.app
Free hosting API for HTML pages, JSON documents, key-value pairs, files, and multi-file sites. Publish anonymously; receive a short URL and an owner token for later updates. TTL-based retention (15–30 days). REST + AI-agent friendly.
Files added
APIs/brewpage.app/1.30.3/openapi.yamlSource of truth
Categories
Validation
info.version(1.30.3) matches folder name (APIs/brewpage.app/1.30.3/).x-origin.urlreturns 200 anonymously.x-logo.urlreturns 200 anonymously.x-providerNameset tobrewpage.app.Contact
Maintainer: @kochetkov-ma