Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] - updates to bar spec #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
generation/
generation/
node_modules/
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1375,9 +1375,7 @@ For example:
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Order"
$ref: "#/components/schemas/Order"
responses:
"200":
description: The order was created successfully.
Expand Down Expand Up @@ -1460,6 +1458,18 @@ content:

#### Media Type Object

A Media Type Object describes the the request or response for a media type, with optional examples.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `schema` | [Schema Object](#schema-object) | :heavy_minus_sign: | A schema that describes the request or response content. |
| `example` | *any* | :heavy_minus_sign: | An optional example of the media type. This example overrides any examples from the [Schema Object](#schema-object) in the `schema` field. Mutually exclusive of the `examples` field. |
| `examples` | *map[string, [Example Object](#example-object) \| [OpenAPI Reference Object](#openapi-reference-object)]* | :heavy_minus_sign: | Optional examples of the media type. These examples overrides any examples from the [Schema Object](#schema-object) in the `schema` field. Mutually exclusive of the `example` field. |
| `encoding` | *map[string, [Encoding Object](#encoding-object)]* | :heavy_minus_sign: | An optional map of [Encoding Objects](#encoding-object). Each Encoding Object's key should match one of the properties from the [Schema Object](#schema-object) in the `schema` field. Only applies to [Request Body Objects](#request-body-object) when the media type is `multipart` or `application/x-www-form-urlencoded`. |
| `x-*` | [Extensions](#extensions) | :heavy_minus_sign: | Any number of extension fields as required by tooling and vendors. |

#### Encoding Object

`TODO`

### Headers
Expand Down
Binary file added bun.lockb
Binary file not shown.
6 changes: 6 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import validate from "./validate";

const args = process.argv.slice(2);
if (args[0] === "--validate") {
validate();
}
Loading