Skip to content
Open
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
15 changes: 15 additions & 0 deletions conversion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
A conversion of the OpenAI OpenAPI to TypeSpec.

There are some deltas:

### Changes to API Semantics:

- Many things are missing defaults (mostly due to bug where we can't set null defaults)
- Error responses have been added.
- Where known, the `object` property's type is narrowed from string to the constant value it will always be

### Changes to API metadata or OpenAPI format

- Much of the x-oaiMeta entries have not been added.
- In some cases, new schemas needed to be defined in order to be defined in TypeSpec (e.g. because the constraints could not be added to a model property with a heterogeneous type)
- There is presently no way to set `title`
2 changes: 1 addition & 1 deletion main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ using TypeSpec.Http;
},
version: "2.0.0",
})
@useAuth(BearerAuth)
@useAuth(ApiKeyAuth<ApiKeyLocation.header, "AUTHORIZATION">)
namespace OpenAI;
16 changes: 2 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
A conversion of the OpenAI OpenAPI to TypeSpec.
# OpenAPI spec for the OpenAI API
Copy link
Author

Choose a reason for hiding this comment

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

This is a weird Windows thing, we think, and I can follow up by deleting this file, which I've moved to conversion.md.


There are some deltas:

### Changes to API Semantics:

- Many things are missing defaults (mostly due to bug where we can't set null defaults)
- Error responses have been added.
- Where known, the `object` property's type is narrowed from string to the constant value it will always be

### Changes to API metadata or OpenAPI format

- Much of the x-oaiMeta entries have not been added.
- In some cases, new schemas needed to be defined in order to be defined in TypeSpec (e.g. because the constraints could not be added to a model property with a heterogeneous type)
- There is presently no way to set `title`
This repository contains an [OpenAPI](https://www.openapis.org/) specification for the [OpenAI API](https://platform.openai.com/docs/api-reference).