Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
</tr>
</table>

With thanks to [37 past sponsors](https://htmlpreview.github.io/?https://github.com/middleapi/static/blob/main/sponsors.svg) who helped get Oasty here.
With thanks to [37 past sponsors](https://htmlpreview.github.io/?https://github.com/middleapi/static/blob/main/sponsors.svg) who helped get openapi-spec here.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@oasty/repo",
"name": "@openapi-spec/repo",
"version": "0.0.0",
"license": "MIT",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions packages/downgrader/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @oasty/downgrader
# @openapi-spec/downgrader

Downgrade [OpenAPI Specification](https://spec.openapis.org/) documents one minor version at a time: 3.2 → 3.1 and 3.1 → 3.0. Each converter works on an entire document or on a single Schema Object.

Expand All @@ -14,7 +14,7 @@ import {
downgradeSchemaV32ToV31,
downgradeSpecV31ToV30,
downgradeSpecV32ToV31,
} from "@oasty/downgrader";
} from "@openapi-spec/downgrader";

const v31 = downgradeSpecV32ToV31(v32Document);
const v30 = downgradeSpecV31ToV30(v31Document);
Expand Down
10 changes: 5 additions & 5 deletions packages/downgrader/package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"name": "@oasty/downgrader",
"name": "@openapi-spec/downgrader",
"version": "0.0.0",
"description": "Downgrade OpenAPI specifications one minor version at a time: 3.2 to 3.1 and 3.1 to 3.0, for whole documents or individual schemas",
"keywords": [
"converter",
"downgrade",
"oas",
"oasty",
"openapi",
"openapi-3.0",
"openapi-3.1",
"openapi-3.2",
"openapi-spec",
"specification",
"swagger",
"typescript"
],
"homepage": "https://github.com/middleapi/oasty",
"homepage": "https://github.com/middleapi/openapi-spec",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/middleapi/oasty.git",
"url": "git+https://github.com/middleapi/openapi-spec.git",
"directory": "packages/downgrader"
},
"funding": [
Expand Down Expand Up @@ -63,6 +63,6 @@
"type:check": "tsc -b"
},
"dependencies": {
"@oasty/types": "workspace:^"
"@openapi-spec/types": "workspace:^"
}
}
2 changes: 1 addition & 1 deletion packages/downgrader/src/v3.1-to-v3.0.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* oxlint-disable anti-slop/no-unknown-parameters, anti-slop/no-unknown-returns -- the helpers deliberately accept and return `unknown` so tests can feed malformed input to the graceful-degradation branches and inspect loosely-shaped output */

import type { OpenAPIV3_1 } from "@oasty/types";
import type { OpenAPIV3_1 } from "@openapi-spec/types";

import type { UnknownRecord } from "./shared";
import { downgradeSchemaV31ToV30, downgradeSpecV31ToV30 } from "./v3.1-to-v3.0";
Expand Down
2 changes: 1 addition & 1 deletion packages/downgrader/src/v3.1-to-v3.0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @see {@link https://spec.openapis.org/oas/v3.0.4.html}
*/

import type { OpenAPIV3_0, OpenAPIV3_1 } from "@oasty/types";
import type { OpenAPIV3_0, OpenAPIV3_1 } from "@openapi-spec/types";

import type { FieldConverter, FieldTable, UnknownRecord } from "./shared";
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/downgrader/src/v3.2-to-v3.1.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* oxlint-disable anti-slop/no-unknown-parameters, anti-slop/no-unknown-returns -- the helpers deliberately accept and return `unknown` so tests can feed malformed input to the graceful-degradation branches and inspect loosely-shaped output */

import type { OpenAPIV3_2 } from "@oasty/types";
import type { OpenAPIV3_2 } from "@openapi-spec/types";

import type { UnknownRecord } from "./shared";
import { downgradeSchemaV32ToV31, downgradeSpecV32ToV31 } from "./v3.2-to-v3.1";
Expand Down
2 changes: 1 addition & 1 deletion packages/downgrader/src/v3.2-to-v3.1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @see {@link https://spec.openapis.org/oas/v3.1.2.html}
*/

import type { OpenAPIV3_1, OpenAPIV3_2 } from "@oasty/types";
import type { OpenAPIV3_1, OpenAPIV3_2 } from "@openapi-spec/types";

import type { FieldConverter, UnknownRecord } from "./shared";
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/downgrader/tests/corpus.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { OpenAPIV3_1, OpenAPIV3_2 } from "@oasty/types";
import type { OpenAPIV3_1, OpenAPIV3_2 } from "@openapi-spec/types";
/* oxlint-disable anti-slop/no-unknown-parameters, anti-slop/no-object-parameters, anti-slop/no-unsafe-dictionary-type -- these corpus tests bulk-feed whole OpenAPI documents into the converters and a generic JSON-schema validator, so version-agnostic document shapes are the domain contract */
import { Validator } from "@seriousme/openapi-schema-validator";

Expand Down
2 changes: 1 addition & 1 deletion packages/downgrader/tests/e2e.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { OpenAPIV3_1, OpenAPIV3_2 } from "@oasty/types";
import type { OpenAPIV3_1, OpenAPIV3_2 } from "@openapi-spec/types";
/* oxlint-disable anti-slop/no-unknown-parameters, anti-slop/no-object-parameters, anti-slop/no-unsafe-dictionary-type -- these e2e tests shuttle whole OpenAPI documents across three spec versions into the converters and a generic JSON-schema validator, so version-agnostic document shapes are the domain contract */
import { Validator } from "@seriousme/openapi-schema-validator";

Expand Down
18 changes: 11 additions & 7 deletions packages/types/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# @oasty/types
# @openapi-spec/types

TypeScript types for the [OpenAPI Specification](https://spec.openapis.org/), covering versions 3.0, 3.1, and 3.2 with complete inline documentation.

Each version module is authored against the latest patch release of its minor line:

- `@oasty/types/v3.0` — OpenAPI [3.0.4](https://spec.openapis.org/oas/v3.0.4.html)
- `@oasty/types/v3.1` — OpenAPI [3.1.2](https://spec.openapis.org/oas/v3.1.2.html), reusing 3.0 types where unchanged
- `@oasty/types/v3.2` — OpenAPI [3.2.0](https://spec.openapis.org/oas/v3.2.0.html), reusing 3.1 types where unchanged
- `@openapi-spec/types/v3.0` — OpenAPI [3.0.4](https://spec.openapis.org/oas/v3.0.4.html)
- `@openapi-spec/types/v3.1` — OpenAPI [3.1.2](https://spec.openapis.org/oas/v3.1.2.html), reusing 3.0 types where unchanged
- `@openapi-spec/types/v3.2` — OpenAPI [3.2.0](https://spec.openapis.org/oas/v3.2.0.html), reusing 3.1 types where unchanged

## Usage

```ts
import type { OpenAPIObject, SchemaObject } from "@oasty/types/v3.1";
import type { OpenAPIObject, SchemaObject } from "@openapi-spec/types/v3.1";

// or via namespaces from the root export
import type { OpenAPIV3_0, OpenAPIV3_1, OpenAPIV3_2 } from "@oasty/types";
import type {
OpenAPIV3_0,
OpenAPIV3_1,
OpenAPIV3_2,
} from "@openapi-spec/types";

// SchemaObject accepts an optional data type for its data-carrying fields
// (`enum`, `default`, `example`, and in 3.1+ `const` and `examples`).
Expand Down Expand Up @@ -104,4 +108,4 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
</tr>
</table>

With thanks to [37 past sponsors](https://htmlpreview.github.io/?https://github.com/middleapi/static/blob/main/sponsors.svg) who helped get Oasty here.
With thanks to [37 past sponsors](https://htmlpreview.github.io/?https://github.com/middleapi/static/blob/main/sponsors.svg) who helped get openapi-spec here.
8 changes: 4 additions & 4 deletions packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"name": "@oasty/types",
"name": "@openapi-spec/types",
"version": "0.0.0",
"description": "TypeScript types for the OpenAPI Specification, covering versions 3.0, 3.1, and 3.2 with complete inline documentation",
"keywords": [
"oas",
"oasty",
"openapi",
"openapi-3.0",
"openapi-3.1",
"openapi-3.2",
"openapi-spec",
"openapi-types",
"specification",
"swagger",
"types",
"typescript"
],
"homepage": "https://github.com/middleapi/oasty",
"homepage": "https://github.com/middleapi/openapi-spec",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/middleapi/oasty.git",
"url": "git+https://github.com/middleapi/openapi-spec.git",
"directory": "packages/types"
},
"funding": [
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/sync-sponsors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const buildSponsorsSection = (sponsors: Sponsor[]): string => {
const noun = pastSponsors.length === 1 ? "past sponsor" : "past sponsors";

lines.push(
`With thanks to [${pastSponsors.length} ${noun}](${PAST_SPONSORS_URL}) who helped get Oasty here.`,
`With thanks to [${pastSponsors.length} ${noun}](${PAST_SPONSORS_URL}) who helped get openapi-spec here.`,
""
);
}
Expand Down