From d78fe2ac9e8a56d64473840f8c38e46e68a8a469 Mon Sep 17 00:00:00 2001 From: Kevin Whinnery Date: Fri, 17 Jan 2025 12:54:50 -0600 Subject: [PATCH 1/6] Update openapi.yaml --- openapi.yaml | 619 ++++++++++++++++++++++++--------------------------- 1 file changed, 297 insertions(+), 322 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 1c0b1fad..8d42e900 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1364,6 +1364,9 @@ paths: application/json: schema: $ref: "#/components/schemas/CreateChatCompletionResponse" + text/event-stream: + schema: + $ref: "#/components/schemas/CreateChatCompletionStreamResponse" x-oaiMeta: name: Create chat completion group: chat @@ -1443,6 +1446,7 @@ paths: "logprobs": null, "finish_reason": "stop" }], + "service_tier": "default", "usage": { "prompt_tokens": 9, "completion_tokens": 12, @@ -4372,7 +4376,18 @@ paths: "email": "user@example.com" }, "ip_address": "127.0.0.1", - "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" + "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + "ja3": "a497151ce4338a12c4418c44d375173e", + "ja4": "q13d0313h3_55b375c5d22e_c7319ce65786", + "ip_address_details": { + "country": "US", + "city": "San Francisco", + "region": "California", + "region_code": "CA", + "asn": "1234", + "latitude": "37.77490", + "longitude": "-122.41940" + } } }, "api_key.updated": { @@ -4657,18 +4672,17 @@ paths: curl https://api.openai.com/v1/organization/invites/invite-abc \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "organization.invite", - "id": "invite-abc", - "email": "user@example.com", - "role": "owner", - "status": "accepted", - "invited_at": 1711471533, - "expires_at": 1711471533, - "accepted_at": 1711471533 - } + response: | + { + "object": "organization.invite", + "id": "invite-abc", + "email": "user@example.com", + "role": "owner", + "status": "accepted", + "invited_at": 1711471533, + "expires_at": 1711471533, + "accepted_at": 1711471533 + } delete: summary: Delete an invite. If the invite has already been accepted, it cannot be deleted. @@ -4700,13 +4714,12 @@ paths: https://api.openai.com/v1/organization/invites/invite-abc \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "organization.invite.deleted", - "id": "invite-abc", - "deleted": true - } + response: | + { + "object": "organization.invite.deleted", + "id": "invite-abc", + "deleted": true + } /organization/projects: get: summary: Returns a list of projects. @@ -4759,24 +4772,23 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "list", - "data": [ - { - "id": "proj_abc", - "object": "organization.project", - "name": "Project example", - "created_at": 1711471533, - "archived_at": null, - "status": "active" - } - ], - "first_id": "proj-abc", - "last_id": "proj-xyz", - "has_more": false - } + response: | + { + "object": "list", + "data": [ + { + "id": "proj_abc", + "object": "organization.project", + "name": "Project example", + "created_at": 1711471533, + "archived_at": null, + "status": "active" + } + ], + "first_id": "proj-abc", + "last_id": "proj-xyz", + "has_more": false + } post: summary: Create a new project in the organization. Projects can be created and archived, but cannot be deleted. @@ -4810,16 +4822,15 @@ paths: -d '{ "name": "Project ABC" }' - response: - content: | - { - "id": "proj_abc", - "object": "organization.project", - "name": "Project ABC", - "created_at": 1711471533, - "archived_at": null, - "status": "active" - } + response: | + { + "id": "proj_abc", + "object": "organization.project", + "name": "Project ABC", + "created_at": 1711471533, + "archived_at": null, + "status": "active" + } /organization/projects/{project_id}: get: summary: Retrieves a project. @@ -4852,16 +4863,15 @@ paths: curl https://api.openai.com/v1/organization/projects/proj_abc \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "id": "proj_abc", - "object": "organization.project", - "name": "Project example", - "created_at": 1711471533, - "archived_at": null, - "status": "active" - } + response: | + { + "id": "proj_abc", + "object": "organization.project", + "name": "Project example", + "created_at": 1711471533, + "archived_at": null, + "status": "active" + } post: summary: Modifies a project in the organization. operationId: modify-project @@ -4960,40 +4970,33 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "list", - "data": [ - { - "object": "organization.project.api_key", - "redacted_value": "sk-abc...def", - "name": "My API Key", - "created_at": 1711471533, - "id": "key_abc", - "owner": { - "type": "user", - "user": { - "object": "organization.project.user", - "id": "user_abc", - "name": "First Last", - "email": "user@example.com", - "role": "owner", - "added_at": 1711471533 - } - } - } - ], - "first_id": "key_abc", - "last_id": "key_xyz", - "has_more": false - } - error_response: - content: | - { - "code": 400, - "message": "Project {name} is archived" - } + response: | + { + "object": "list", + "data": [ + { + "object": "organization.project.api_key", + "redacted_value": "sk-abc...def", + "name": "My API Key", + "created_at": 1711471533, + "id": "key_abc", + "owner": { + "type": "user", + "user": { + "object": "organization.project.user", + "id": "user_abc", + "name": "First Last", + "email": "user@example.com", + "role": "owner", + "added_at": 1711471533 + } + } + } + ], + "first_id": "key_abc", + "last_id": "key_xyz", + "has_more": false + } /organization/projects/{project_id}/api_keys/{key_id}: get: summary: Retrieves an API key in the project. @@ -5033,26 +5036,25 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "organization.project.api_key", - "redacted_value": "sk-abc...def", - "name": "My API Key", - "created_at": 1711471533, - "id": "key_abc", - "owner": { - "type": "user", - "user": { - "object": "organization.project.user", - "id": "user_abc", - "name": "First Last", - "email": "user@example.com", - "role": "owner", - "added_at": 1711471533 - } - } - } + response: | + { + "object": "organization.project.api_key", + "redacted_value": "sk-abc...def", + "name": "My API Key", + "created_at": 1711471533, + "id": "key_abc", + "owner": { + "type": "user", + "user": { + "object": "organization.project.user", + "id": "user_abc", + "name": "First Last", + "email": "user@example.com", + "role": "owner", + "added_at": 1711471533 + } + } + } delete: summary: Deletes an API key from the project. operationId: delete-project-api-key @@ -5097,19 +5099,12 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "organization.project.api_key.deleted", - "id": "key_abc", - "deleted": true - } - error_response: - content: > - { - "code": 400, - "message": "API keys cannot be deleted for service accounts, please delete the service account" - } + response: | + { + "object": "organization.project.api_key.deleted", + "id": "key_abc", + "deleted": true + } /organization/projects/{project_id}/archive: post: summary: Archives a project in the organization. Archived projects cannot be @@ -5142,16 +5137,15 @@ paths: https://api.openai.com/v1/organization/projects/proj_abc/archive \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "id": "proj_abc", - "object": "organization.project", - "name": "Project DEF", - "created_at": 1711471533, - "archived_at": 1711471533, - "status": "archived" - } + response: | + { + "id": "proj_abc", + "object": "organization.project", + "name": "Project DEF", + "created_at": 1711471533, + "archived_at": 1711471533, + "status": "archived" + } /organization/projects/{project_id}/rate_limits: get: summary: Returns the rate limits per model for a project. @@ -5366,23 +5360,22 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "list", - "data": [ - { - "object": "organization.project.service_account", - "id": "svc_acct_abc", - "name": "Service Account", - "role": "owner", - "created_at": 1711471533 - } - ], - "first_id": "svc_acct_abc", - "last_id": "svc_acct_xyz", - "has_more": false - } + response: | + { + "object": "list", + "data": [ + { + "object": "organization.project.service_account", + "id": "svc_acct_abc", + "name": "Service Account", + "role": "owner", + "created_at": 1711471533 + } + ], + "first_id": "svc_acct_abc", + "last_id": "svc_acct_xyz", + "has_more": false + } post: summary: Creates a new service account in the project. This also returns an unredacted API key for the service account. @@ -5433,22 +5426,21 @@ paths: -d '{ "name": "Production App" }' - response: - content: | - { - "object": "organization.project.service_account", - "id": "svc_acct_abc", - "name": "Production App", - "role": "member", - "created_at": 1711471533, - "api_key": { - "object": "organization.project.service_account.api_key", - "value": "sk-abcdefghijklmnop123", - "name": "Secret Key", - "created_at": 1711471533, - "id": "key_abc" - } - } + response: | + { + "object": "organization.project.service_account", + "id": "svc_acct_abc", + "name": "Production App", + "role": "member", + "created_at": 1711471533, + "api_key": { + "object": "organization.project.service_account.api_key", + "value": "sk-abcdefghijklmnop123", + "name": "Secret Key", + "created_at": 1711471533, + "id": "key_abc" + } + } /organization/projects/{project_id}/service_accounts/{service_account_id}: get: summary: Retrieves a service account in the project. @@ -5489,15 +5481,14 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "organization.project.service_account", - "id": "svc_acct_abc", - "name": "Service Account", - "role": "owner", - "created_at": 1711471533 - } + response: | + { + "object": "organization.project.service_account", + "id": "svc_acct_abc", + "name": "Service Account", + "role": "owner", + "created_at": 1711471533 + } delete: summary: Deletes a service account from the project. operationId: delete-project-service-account @@ -5536,13 +5527,12 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "organization.project.service_account.deleted", - "id": "svc_acct_abc", - "deleted": true - } + response: | + { + "object": "organization.project.service_account.deleted", + "id": "svc_acct_abc", + "deleted": true + } /organization/projects/{project_id}/users: get: summary: Returns a list of users in the project. @@ -5601,30 +5591,23 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "list", - "data": [ - { - "object": "organization.project.user", - "id": "user_abc", - "name": "First Last", - "email": "user@example.com", - "role": "owner", - "added_at": 1711471533 - } - ], - "first_id": "user-abc", - "last_id": "user-xyz", - "has_more": false - } - error_response: - content: | - { - "code": 400, - "message": "Project {name} is archived" - } + response: | + { + "object": "list", + "data": [ + { + "object": "organization.project.user", + "id": "user_abc", + "name": "First Last", + "email": "user@example.com", + "role": "owner", + "added_at": 1711471533 + } + ], + "first_id": "user-abc", + "last_id": "user-xyz", + "has_more": false + } post: summary: Adds a user to the project. Users must already be members of the organization to be added to a project. @@ -5674,21 +5657,14 @@ paths: "user_id": "user_abc", "role": "member" }' - response: - content: | - { - "object": "organization.project.user", - "id": "user_abc", - "email": "user@example.com", - "role": "owner", - "added_at": 1711471533 - } - error_response: - content: | - { - "code": 400, - "message": "Project {name} is archived" - } + response: | + { + "object": "organization.project.user", + "id": "user_abc", + "email": "user@example.com", + "role": "owner", + "added_at": 1711471533 + } /organization/projects/{project_id}/users/{user_id}: get: summary: Retrieves a user in the project. @@ -5728,16 +5704,15 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "organization.project.user", - "id": "user_abc", - "name": "First Last", - "email": "user@example.com", - "role": "owner", - "added_at": 1711471533 - } + response: | + { + "object": "organization.project.user", + "id": "user_abc", + "name": "First Last", + "email": "user@example.com", + "role": "owner", + "added_at": 1711471533 + } post: summary: Modifies a user's role in the project. operationId: modify-project-user @@ -5792,16 +5767,15 @@ paths: -d '{ "role": "owner" }' - response: - content: | - { - "object": "organization.project.user", - "id": "user_abc", - "name": "First Last", - "email": "user@example.com", - "role": "owner", - "added_at": 1711471533 - } + response: | + { + "object": "organization.project.user", + "id": "user_abc", + "name": "First Last", + "email": "user@example.com", + "role": "owner", + "added_at": 1711471533 + } delete: summary: Deletes a user from the project. operationId: delete-project-user @@ -5846,13 +5820,12 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "organization.project.user.deleted", - "id": "user_abc", - "deleted": true - } + response: | + { + "object": "organization.project.user.deleted", + "id": "user_abc", + "deleted": true + } /organization/usage/audio_speeches: get: summary: Get audio speeches usage details for the organization. @@ -7003,24 +6976,23 @@ paths: \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "list", - "data": [ - { - "object": "organization.user", - "id": "user_abc", - "name": "First Last", - "email": "user@example.com", - "role": "owner", - "added_at": 1711471533 - } - ], - "first_id": "user-abc", - "last_id": "user-xyz", - "has_more": false - } + response: | + { + "object": "list", + "data": [ + { + "object": "organization.user", + "id": "user_abc", + "name": "First Last", + "email": "user@example.com", + "role": "owner", + "added_at": 1711471533 + } + ], + "first_id": "user-abc", + "last_id": "user-xyz", + "has_more": false + } /organization/users/{user_id}: get: summary: Retrieves a user by their identifier. @@ -7052,16 +7024,15 @@ paths: curl https://api.openai.com/v1/organization/users/user_abc \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "organization.user", - "id": "user_abc", - "name": "First Last", - "email": "user@example.com", - "role": "owner", - "added_at": 1711471533 - } + response: | + { + "object": "organization.user", + "id": "user_abc", + "name": "First Last", + "email": "user@example.com", + "role": "owner", + "added_at": 1711471533 + } post: summary: Modifies a user's role in the organization. operationId: modify-user @@ -7102,16 +7073,15 @@ paths: -d '{ "role": "owner" }' - response: - content: | - { - "object": "organization.user", - "id": "user_abc", - "name": "First Last", - "email": "user@example.com", - "role": "owner", - "added_at": 1711471533 - } + response: | + { + "object": "organization.user", + "id": "user_abc", + "name": "First Last", + "email": "user@example.com", + "role": "owner", + "added_at": 1711471533 + } delete: summary: Deletes a user from the organization. operationId: delete-user @@ -7142,13 +7112,12 @@ paths: https://api.openai.com/v1/organization/users/user_abc \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" - response: - content: | - { - "object": "organization.user.deleted", - "id": "user_abc", - "deleted": true - } + response: | + { + "object": "organization.user.deleted", + "id": "user_abc", + "deleted": true + } /realtime/sessions: post: summary: > @@ -11012,7 +10981,7 @@ paths: "object": "vector_store.file_batch", "created_at": 1699061776, "vector_store_id": "vs_abc123", - "status": "cancelling", + "status": "in_progress", "file_counts": { "in_progress": 12, "completed": 3, @@ -13475,7 +13444,6 @@ components: the grouped costs result. required: - object - - sessions x-oaiMeta: name: Costs object example: | @@ -13744,7 +13712,6 @@ components: - finish_reason - index - message - - logprobs properties: finish_reason: type: string @@ -14195,8 +14162,7 @@ components: x-oaiExpandable: true seed: type: integer - minimum: -9223372036854776000 - maximum: 9223372036854776000 + format: int64 nullable: true description: > This feature is in Beta. @@ -14219,8 +14185,6 @@ components: - If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee. - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee. - When not set, the default behavior is 'auto'. - - When this parameter is set, the response body will include the `service_tier` utilized. type: string enum: - auto @@ -14436,9 +14400,7 @@ components: type: string description: The model used for the chat completion. service_tier: - description: The service tier used for processing the request. This field is - only included if the `service_tier` parameter is specified in the - request. + description: The service tier used for processing the request. type: string enum: - scale @@ -14582,9 +14544,7 @@ components: type: string description: The model to generate the completion. service_tier: - description: The service tier used for processing the request. This field is - only included if the `service_tier` parameter is specified in the - request. + description: The service tier used for processing the request. type: string enum: - scale @@ -14828,8 +14788,7 @@ components: penalties.](/docs/guides/text-generation) seed: type: integer - minimum: -9223372036854776000 - maximum: 9223372036854776000 + format: int64 nullable: true description: > If specified, our system will make a best effort to sample @@ -15047,7 +15006,8 @@ components: cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) - for counting tokens. + for counting tokens. Some models may also impose a limit on total + number of tokens summed across inputs. example: The quick brown fox jumped over the lazy dog oneOf: - type: string @@ -16321,16 +16281,19 @@ components: maxLength: 4096 voice: description: The voice to use when generating the audio. Supported voices are - `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of - the voices are available in the [Text to speech - guide](/docs/guides/text-to-speech#voice-options). + `alloy`, `ash`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage` and + `shimmer`. Previews of the voices are available in the [Text to + speech guide](/docs/guides/text-to-speech#voice-options). type: string enum: - alloy + - ash + - coral - echo - fable - onyx - nova + - sage - shimmer response_format: description: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, @@ -20087,13 +20050,16 @@ components: inserted. If not set, the new item will be appended to the end of the - conversation. + conversation. - If set, it allows an item to be inserted mid-conversation. If the - ID + If set to `root`, the new item will be added to the beginning of the + conversation. - cannot be found, an error will be returned and the item will not be - added. + If set to an existing ID, it allows an item to be inserted + mid-conversation. If the + + ID cannot be found, an error will be returned and the item will not + be added. item: $ref: "#/components/schemas/RealtimeConversationItem" required: @@ -22574,6 +22540,10 @@ components: description: > The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. + + For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, + + single channel (mono), and little-endian byte order. output_audio_format: type: string enum: @@ -22583,6 +22553,8 @@ components: description: > The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. + + For `pcm16`, output audio is sampled at a rate of 24kHz. input_audio_transcription: type: object description: > @@ -22703,8 +22675,6 @@ components: RealtimeSessionCreateRequest: type: object description: Realtime session object configuration. - required: - - model properties: modalities: description: | @@ -22788,6 +22758,10 @@ components: description: > The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. + + For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, + + single channel (mono), and little-endian byte order. output_audio_format: type: string enum: @@ -22797,6 +22771,8 @@ components: description: > The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. + + For `pcm16`, output audio is sampled at a rate of 24kHz. input_audio_transcription: type: object description: > @@ -23200,7 +23176,6 @@ components: Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). required: - - type - name required: - type From 5e04ff3dcde8601834132d55719fd703363e87c1 Mon Sep 17 00:00:00 2001 From: Kevin Whinnery Date: Fri, 17 Jan 2025 13:04:45 -0600 Subject: [PATCH 2/6] test spectral --- .github/workflows/validate-openapi.yml | 32 +++++++++----------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/validate-openapi.yml b/.github/workflows/validate-openapi.yml index b7cce206..81c71ee4 100644 --- a/.github/workflows/validate-openapi.yml +++ b/.github/workflows/validate-openapi.yml @@ -1,27 +1,17 @@ -name: Validate OpenAPI definition +name: Run Spectral on Pull Requests + on: - pull_request: - types: [opened, reopened, synchronize] + - pull_request jobs: - validate_openapi: + build: + name: Run Spectral runs-on: ubuntu-latest - name: Swagger Editor Validator Service - - # Service containers to run with `runner-job` - services: - # Label used to access the service container - swagger-editor: - # Docker Hub image - image: swaggerapi/swagger-editor - ports: - # Maps port 8080 on service container to the host 80 - - 80:8080 - steps: - - uses: actions/checkout@v2 - - name: Validate OpenAPI definition - uses: char0n/swagger-editor-validate@v1 + # Check out the repository + - uses: actions/checkout@v3 + + # Run Spectral + - uses: stoplightio/spectral-action@latest with: - swagger-editor-url: http://localhost/ - definition-file: openapi.yaml + file_glob: 'openapi.yaml' \ No newline at end of file From 1819ff84cf1f347b442832267fe516384900edd1 Mon Sep 17 00:00:00 2001 From: Kevin Whinnery Date: Fri, 17 Jan 2025 13:06:33 -0600 Subject: [PATCH 3/6] Update validate-openapi.yml --- .github/workflows/validate-openapi.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-openapi.yml b/.github/workflows/validate-openapi.yml index 81c71ee4..02fddf0b 100644 --- a/.github/workflows/validate-openapi.yml +++ b/.github/workflows/validate-openapi.yml @@ -14,4 +14,5 @@ jobs: # Run Spectral - uses: stoplightio/spectral-action@latest with: - file_glob: 'openapi.yaml' \ No newline at end of file + file_glob: 'openapi.yaml' + spectral_ruleset: 'spectral:recommended' \ No newline at end of file From 45784fa84c18b3b3a64c368016a46e308c0254d5 Mon Sep 17 00:00:00 2001 From: Kevin Whinnery Date: Fri, 17 Jan 2025 13:08:12 -0600 Subject: [PATCH 4/6] oas built in --- .github/workflows/validate-openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-openapi.yml b/.github/workflows/validate-openapi.yml index 02fddf0b..d57e9707 100644 --- a/.github/workflows/validate-openapi.yml +++ b/.github/workflows/validate-openapi.yml @@ -15,4 +15,4 @@ jobs: - uses: stoplightio/spectral-action@latest with: file_glob: 'openapi.yaml' - spectral_ruleset: 'spectral:recommended' \ No newline at end of file + spectral_ruleset: 'spectral:oas' \ No newline at end of file From 0bb2b8ba28ccc914a3840257c7b36f63b9cc8d7a Mon Sep 17 00:00:00 2001 From: Kevin Whinnery Date: Fri, 17 Jan 2025 13:15:20 -0600 Subject: [PATCH 5/6] ignore some validation rules --- .spectral.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .spectral.yaml diff --git a/.spectral.yaml b/.spectral.yaml new file mode 100644 index 00000000..d00e9d95 --- /dev/null +++ b/.spectral.yaml @@ -0,0 +1,4 @@ +extends: ["spectral:oas"] +rules: + no-$ref-siblings: off + oas3-valid-schema-example: off \ No newline at end of file From 1eb82f53f5133a16d6c267f7e6c90312b58dab57 Mon Sep 17 00:00:00 2001 From: Kevin Whinnery Date: Fri, 17 Jan 2025 13:16:58 -0600 Subject: [PATCH 6/6] use default config file --- .github/workflows/validate-openapi.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/validate-openapi.yml b/.github/workflows/validate-openapi.yml index d57e9707..aff042ae 100644 --- a/.github/workflows/validate-openapi.yml +++ b/.github/workflows/validate-openapi.yml @@ -15,4 +15,3 @@ jobs: - uses: stoplightio/spectral-action@latest with: file_glob: 'openapi.yaml' - spectral_ruleset: 'spectral:oas' \ No newline at end of file