Skip to content

Commit c76a9ed

Browse files
authored
make query optional if all params are optional (#1092)
* make query optional if all params are optional * update examples
1 parent 5a3c9f7 commit c76a9ed

11 files changed

+1515
-1069
lines changed

examples/digital-ocean-api.ts

+55-55
Large diffs are not rendered by default.

examples/github-api-next.ts

+496-473
Large diffs are not rendered by default.

examples/github-api-next.yaml

+49-10
Original file line numberDiff line numberDiff line change
@@ -9865,6 +9865,7 @@ paths:
98659865
- forks
98669866
- sources
98679867
- member
9868+
default: all
98689869
- name: sort
98699870
description: The property to sort the results by.
98709871
in: query
@@ -20740,6 +20741,16 @@ paths:
2074020741
are made to respect this upon creation. Assigned by IP if not
2074120742
provided.
2074220743
type: string
20744+
geo:
20745+
description: The geographic area for this codespace. If not specified,
20746+
the value is assigned by IP. This property replaces `location`,
20747+
which is being deprecated.
20748+
type: string
20749+
enum:
20750+
- EuropeWest
20751+
- SoutheastAsia
20752+
- UsEast
20753+
- UsWest
2074320754
client_ip:
2074420755
description: IP for location auto-detection when proxying a request
2074520756
type: string
@@ -25214,10 +25225,6 @@ paths:
2521425225
sha:
2521525226
type: string
2521625227
description: The SHA1 value for this reference.
25217-
key:
25218-
type: string
25219-
examples:
25220-
- '"refs/heads/newbranch"'
2522125228
required:
2522225229
- ref
2522325230
- sha
@@ -30820,6 +30827,16 @@ paths:
3082030827
are made to respect this upon creation. Assigned by IP if not
3082130828
provided.
3082230829
type: string
30830+
geo:
30831+
description: The geographic area for this codespace. If not specified,
30832+
the value is assigned by IP. This property replaces `location`,
30833+
which is being deprecated.
30834+
type: string
30835+
enum:
30836+
- EuropeWest
30837+
- SoutheastAsia
30838+
- UsEast
30839+
- UsWest
3082330840
client_ip:
3082430841
description: IP for location auto-detection when proxying a request
3082530842
type: string
@@ -30995,9 +31012,10 @@ paths:
3099531012
- RIGHT
3099631013
line:
3099731014
type: integer
30998-
description: The line of the blob in the pull request diff that
30999-
the comment applies to. For a multi-line comment, the last line
31000-
of the range that your comment applies to.
31015+
description: "**Required unless using `subject_type:file`**. The
31016+
line of the blob in the pull request diff that the comment applies
31017+
to. For a multi-line comment, the last line of the range that
31018+
your comment applies to."
3100131019
start_line:
3100231020
type: integer
3100331021
description: '**Required when using multi-line comments unless using
@@ -31036,7 +31054,6 @@ paths:
3103631054
- body
3103731055
- commit_id
3103831056
- path
31039-
- line
3104031057
examples:
3104131058
example-for-a-multi-line-comment:
3104231059
summary: Example for a multi-line comment
@@ -33966,6 +33983,8 @@ paths:
3396633983
Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`.
3396733984

3396833985
The array order is oldest week (index 0) to most recent week.
33986+
33987+
The most recent week is seven days ago at UTC midnight to today at UTC midnight.
3396933988
tags:
3397033989
- repos
3397133990
operationId: repos/get-participation-stats
@@ -37594,7 +37613,7 @@ paths:
3759437613
get:
3759537614
summary: Get the authenticated user
3759637615
description: |-
37597-
If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information.
37616+
If the authenticated user is authenticated with an OAuth token with the `user` scope, then the response lists public and private profile information.
3759837617

3759937618
If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information.
3760037619
tags:
@@ -37935,6 +37954,16 @@ paths:
3793537954
efforts are made to respect this upon creation. Assigned by
3793637955
IP if not provided.
3793737956
type: string
37957+
geo:
37958+
description: The geographic area for this codespace. If not specified,
37959+
the value is assigned by IP. This property replaces `location`,
37960+
which is being deprecated.
37961+
type: string
37962+
enum:
37963+
- EuropeWest
37964+
- SoutheastAsia
37965+
- UsEast
37966+
- UsWest
3793837967
client_ip:
3793937968
description: IP for location auto-detection when proxying a request
3794037969
type: string
@@ -37984,6 +38013,16 @@ paths:
3798438013
efforts are made to respect this upon creation. Assigned by
3798538014
IP if not provided.
3798638015
type: string
38016+
geo:
38017+
description: The geographic area for this codespace. If not specified,
38018+
the value is assigned by IP. This property replaces `location`,
38019+
which is being deprecated.
38020+
type: string
38021+
enum:
38022+
- EuropeWest
38023+
- SoutheastAsia
38024+
- UsEast
38025+
- UsWest
3798738026
machine:
3798838027
description: Machine type to use for this codespace
3798938028
type: string
@@ -38002,7 +38041,7 @@ paths:
3800238041
value:
3800338042
repository_id: 1
3800438043
ref: main
38005-
location: WestUs2
38044+
geo: UsWest
3800638045
responses:
3800738046
'201':
3800838047
description: Response when the codespace was successfully created

0 commit comments

Comments
 (0)