Skip to content

Add brewpage.app (hosting, developer_tools)#2492

Open
kochetkov-ma wants to merge 1 commit into
APIs-guru:mainfrom
kochetkov-ma:add-brewpage
Open

Add brewpage.app (hosting, developer_tools)#2492
kochetkov-ma wants to merge 1 commit into
APIs-guru:mainfrom
kochetkov-ma:add-brewpage

Conversation

@kochetkov-ma

Copy link
Copy Markdown

API

BrewPagehttps://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.yaml

Source of truth

Categories

  • hosting
  • developer_tools

Validation

  • info.version (1.30.3) matches folder name (APIs/brewpage.app/1.30.3/).
  • x-origin.url returns 200 anonymously.
  • x-logo.url returns 200 anonymously.
  • x-providerName set to brewpage.app.
  • No conflict with existing entries.

Contact

Maintainer: @kochetkov-ma

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The content type for file uploads should be multipart/form-data instead of application/json. This matches the operation description and is the standard way to handle binary file transfers in REST APIs.

          multipart/form-data:

content:
application/json:
schema:
type: string

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using type: string for a JSON document store is restrictive. Since the API is intended to store any valid JSON, using an empty schema {} or type: object (if only objects are allowed) would be more appropriate to allow structured data to be sent and validated correctly.

              {}

content:
'*/*':
schema:
$ref: '#/components/schemas/KvGetResponse'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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:
'*/*':

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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:

Comment on lines +127 to +132
- name: X-Password
in: header
description: Access password via header
required: false
schema:
type: string

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant