This document outlines important guidelines and gotchas to consider when contributing to the OAS v3.1.0 for the SDK.
- This will be the version of the sdk that will get published.
- In
components.schemas
, avoid using the deprecatedexample
field. - Use
examples
instead. This should be an array.
- Do not use
nullable: true
as it is completely removed. - Instead, use:
Note: Quotes around
type: [string, "null"]
"null"
are important.
- Always use
kebab-case
foroperationId
.- This ensures the
operationId
is SEO-friendly when appended to the API URL in the README (e.g.,user-bulk-by-address
). - The generator script uses
operationId
to generate method names by convertingkebab-case
tocamelCase
.
- This ensures the
- If the API expects comma-separated values, use the
x-comma-separated
vendor extension.parameters: - name: fids description: Comma separated list of FIDs, up to 100 at a time in: query required: true example: 194, 191, 6131 schema: type: string x-comma-separated: true
- To accept a parameter as a different type from what the API expects, use the
x-accept-as
vendor extension.parameters: - name: fids description: Comma separated list of FIDs, up to 100 at a time in: query required: true example: 194, 191, 6131 schema: type: string x-comma-separated: true x-accept-as: integer
- For limit parameters, use
x-is-limit-param: true
so the SDK can pick up defaults and maximums from the OAS.parameters: - name: limit in: query required: false description: Number of users to fetch example: 10 schema: type: integer format: int32 default: 5 minimum: 1 maximum: 10 x-is-limit-param: true
- End schema names for request bodies with
ReqBody
. - Avoid using
allOf
oroneOf
in request body schemas.
- Always use
kebab-case
for global headers. - Add
x-is-global-header
for a global header.parameters: NeynarExperimentalHeader: name: x-neynar-experimental in: header required: false schema: type: boolean default: false description: "Enables experimental features" x-is-global-header: true
- Ensure tags are written in
PascalCase
.tags: - HubEvents
- Ensure all top-level keys in
reqBody
are insnake_case
.