Skip to content

Commit 0153d3b

Browse files
committed
add resource map and fix naming conflicts as well
1 parent d5ca09e commit 0153d3b

10 files changed

+25812
-30473
lines changed

__fixtures__/output/swagger-client.merged.ts

Lines changed: 0 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -7906,123 +7906,6 @@ export interface WatchDiscoveryV1beta1NamespacedEndpointSliceRequest {
79067906
}
79077907
export interface GetEventsAPIGroupRequest {}
79087908
export interface GetEventsV1APIResourcesRequest {}
7909-
export interface ListEventsV1EventForAllNamespacesRequest {
7910-
allowWatchBookmarks?: boolean;
7911-
continue?: string;
7912-
fieldSelector?: string;
7913-
labelSelector?: string;
7914-
limit?: number;
7915-
pretty?: string;
7916-
resourceVersion?: string;
7917-
resourceVersionMatch?: string;
7918-
timeoutSeconds?: number;
7919-
watch?: boolean;
7920-
}
7921-
export interface ListEventsV1NamespacedEventRequest {
7922-
pretty?: string;
7923-
allowWatchBookmarks?: boolean;
7924-
continue?: string;
7925-
fieldSelector?: string;
7926-
labelSelector?: string;
7927-
limit?: number;
7928-
resourceVersion?: string;
7929-
resourceVersionMatch?: string;
7930-
timeoutSeconds?: number;
7931-
watch?: boolean;
7932-
namespace: string;
7933-
}
7934-
export interface CreateEventsV1NamespacedEventRequest {
7935-
pretty?: string;
7936-
dryRun?: string;
7937-
fieldManager?: string;
7938-
namespace: string;
7939-
body: Event;
7940-
}
7941-
export interface DeleteEventsV1CollectionNamespacedEventRequest {
7942-
pretty?: string;
7943-
continue?: string;
7944-
dryRun?: string;
7945-
fieldSelector?: string;
7946-
gracePeriodSeconds?: number;
7947-
labelSelector?: string;
7948-
limit?: number;
7949-
orphanDependents?: boolean;
7950-
propagationPolicy?: string;
7951-
resourceVersion?: string;
7952-
resourceVersionMatch?: string;
7953-
timeoutSeconds?: number;
7954-
namespace: string;
7955-
}
7956-
export interface ReadEventsV1NamespacedEventRequest {
7957-
pretty?: string;
7958-
name: string;
7959-
namespace: string;
7960-
}
7961-
export interface ReplaceEventsV1NamespacedEventRequest {
7962-
pretty?: string;
7963-
dryRun?: string;
7964-
fieldManager?: string;
7965-
name: string;
7966-
namespace: string;
7967-
body: Event;
7968-
}
7969-
export interface DeleteEventsV1NamespacedEventRequest {
7970-
pretty?: string;
7971-
dryRun?: string;
7972-
gracePeriodSeconds?: number;
7973-
orphanDependents?: boolean;
7974-
propagationPolicy?: string;
7975-
name: string;
7976-
namespace: string;
7977-
}
7978-
export interface PatchEventsV1NamespacedEventRequest {
7979-
pretty?: string;
7980-
dryRun?: string;
7981-
fieldManager?: string;
7982-
force?: boolean;
7983-
name: string;
7984-
namespace: string;
7985-
body: Patch;
7986-
}
7987-
export interface WatchEventsV1EventListForAllNamespacesRequest {
7988-
allowWatchBookmarks?: boolean;
7989-
continue?: string;
7990-
fieldSelector?: string;
7991-
labelSelector?: string;
7992-
limit?: number;
7993-
pretty?: string;
7994-
resourceVersion?: string;
7995-
resourceVersionMatch?: string;
7996-
timeoutSeconds?: number;
7997-
watch?: boolean;
7998-
}
7999-
export interface WatchEventsV1NamespacedEventListRequest {
8000-
allowWatchBookmarks?: boolean;
8001-
continue?: string;
8002-
fieldSelector?: string;
8003-
labelSelector?: string;
8004-
limit?: number;
8005-
pretty?: string;
8006-
resourceVersion?: string;
8007-
resourceVersionMatch?: string;
8008-
timeoutSeconds?: number;
8009-
watch?: boolean;
8010-
namespace: string;
8011-
}
8012-
export interface WatchEventsV1NamespacedEventRequest {
8013-
allowWatchBookmarks?: boolean;
8014-
continue?: string;
8015-
fieldSelector?: string;
8016-
labelSelector?: string;
8017-
limit?: number;
8018-
pretty?: string;
8019-
resourceVersion?: string;
8020-
resourceVersionMatch?: string;
8021-
timeoutSeconds?: number;
8022-
watch?: boolean;
8023-
name: string;
8024-
namespace: string;
8025-
}
80267909
export interface GetEventsV1beta1APIResourcesRequest {}
80277910
export interface ListEventsV1beta1EventForAllNamespacesRequest {
80287911
allowWatchBookmarks?: boolean;
@@ -12314,50 +12197,6 @@ export class KubernetesClient extends APIClient {
1231412197
const path = `/apis/events.k8s.io/v1/`;
1231512198
return await this.get<APIResourceList>(path, null, null, opts);
1231612199
}
12317-
async listEventsV1EventForAllNamespaces(params: ListEventsV1EventForAllNamespacesRequest, opts?: APIClientRequestOpts): Promise<EventList> {
12318-
const path = `/apis/events.k8s.io/v1/events`;
12319-
return await this.get<EventList>(path, null, null, opts);
12320-
}
12321-
async listEventsV1NamespacedEvent(params: ListEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<EventList> {
12322-
const path = `/apis/events.k8s.io/v1/namespaces/${params.namespace}/events`;
12323-
return await this.get<EventList>(path, params.query, null, opts);
12324-
}
12325-
async createEventsV1NamespacedEvent(params: CreateEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Event> {
12326-
const path = `/apis/events.k8s.io/v1/namespaces/${params.namespace}/events`;
12327-
return await this.post<Event>(path, params.query, params.body, opts);
12328-
}
12329-
async deleteEventsV1CollectionNamespacedEvent(params: DeleteEventsV1CollectionNamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Status> {
12330-
const path = `/apis/events.k8s.io/v1/namespaces/${params.namespace}/events`;
12331-
return await this.delete<Status>(path, params.query, null, opts);
12332-
}
12333-
async readEventsV1NamespacedEvent(params: ReadEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Event> {
12334-
const path = `/apis/events.k8s.io/v1/namespaces/${params.namespace}/events/${params.name}`;
12335-
return await this.get<Event>(path, null, null, opts);
12336-
}
12337-
async replaceEventsV1NamespacedEvent(params: ReplaceEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Event> {
12338-
const path = `/apis/events.k8s.io/v1/namespaces/${params.namespace}/events/${params.name}`;
12339-
return await this.put<Event>(path, params.query, params.body, opts);
12340-
}
12341-
async deleteEventsV1NamespacedEvent(params: DeleteEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Status> {
12342-
const path = `/apis/events.k8s.io/v1/namespaces/${params.namespace}/events/${params.name}`;
12343-
return await this.delete<Status>(path, params.query, null, opts);
12344-
}
12345-
async patchEventsV1NamespacedEvent(params: PatchEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Event> {
12346-
const path = `/apis/events.k8s.io/v1/namespaces/${params.namespace}/events/${params.name}`;
12347-
return await this.patch<Event>(path, params.query, params.body, opts);
12348-
}
12349-
async watchEventsV1EventListForAllNamespaces(params: WatchEventsV1EventListForAllNamespacesRequest, opts?: APIClientRequestOpts): Promise<WatchEvent> {
12350-
const path = `/apis/events.k8s.io/v1/watch/events`;
12351-
return await this.get<WatchEvent>(path, null, null, opts);
12352-
}
12353-
async watchEventsV1NamespacedEventList(params: WatchEventsV1NamespacedEventListRequest, opts?: APIClientRequestOpts): Promise<WatchEvent> {
12354-
const path = `/apis/events.k8s.io/v1/watch/namespaces/${params.namespace}/events`;
12355-
return await this.get<WatchEvent>(path, null, null, opts);
12356-
}
12357-
async watchEventsV1NamespacedEvent(params: WatchEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<WatchEvent> {
12358-
const path = `/apis/events.k8s.io/v1/watch/namespaces/${params.namespace}/events/${params.name}`;
12359-
return await this.get<WatchEvent>(path, null, null, opts);
12360-
}
1236112200
async getEventsV1beta1APIResources(params: GetEventsV1beta1APIResourcesRequest, opts?: APIClientRequestOpts): Promise<APIResourceList> {
1236212201
const path = `/apis/events.k8s.io/v1beta1/`;
1236312202
return await this.get<APIResourceList>(path, null, null, opts);

__fixtures__/output/swagger-client.ts

Lines changed: 0 additions & 201 deletions
Original file line numberDiff line numberDiff line change
@@ -9521,163 +9521,6 @@ export interface WatchDiscoveryV1NamespacedEndpointSliceRequest {
95219521
}
95229522
export interface GetEventsAPIGroupRequest {}
95239523
export interface GetEventsV1APIResourcesRequest {}
9524-
export interface ListEventsV1EventForAllNamespacesRequest {
9525-
query: {
9526-
allowWatchBookmarks?: boolean;
9527-
continue?: string;
9528-
fieldSelector?: string;
9529-
labelSelector?: string;
9530-
limit?: number;
9531-
pretty?: string;
9532-
resourceVersion?: string;
9533-
resourceVersionMatch?: string;
9534-
timeoutSeconds?: number;
9535-
watch?: boolean;
9536-
};
9537-
}
9538-
export interface ListEventsV1NamespacedEventRequest {
9539-
query: {
9540-
pretty?: string;
9541-
allowWatchBookmarks?: boolean;
9542-
continue?: string;
9543-
fieldSelector?: string;
9544-
labelSelector?: string;
9545-
limit?: number;
9546-
resourceVersion?: string;
9547-
resourceVersionMatch?: string;
9548-
timeoutSeconds?: number;
9549-
watch?: boolean;
9550-
};
9551-
path: {
9552-
namespace: string;
9553-
};
9554-
}
9555-
export interface CreateEventsV1NamespacedEventRequest {
9556-
query: {
9557-
pretty?: string;
9558-
dryRun?: string;
9559-
fieldManager?: string;
9560-
};
9561-
path: {
9562-
namespace: string;
9563-
};
9564-
body: Event;
9565-
}
9566-
export interface DeleteEventsV1CollectionNamespacedEventRequest {
9567-
query: {
9568-
pretty?: string;
9569-
continue?: string;
9570-
dryRun?: string;
9571-
fieldSelector?: string;
9572-
gracePeriodSeconds?: number;
9573-
labelSelector?: string;
9574-
limit?: number;
9575-
orphanDependents?: boolean;
9576-
propagationPolicy?: string;
9577-
resourceVersion?: string;
9578-
resourceVersionMatch?: string;
9579-
timeoutSeconds?: number;
9580-
};
9581-
path: {
9582-
namespace: string;
9583-
};
9584-
}
9585-
export interface ReadEventsV1NamespacedEventRequest {
9586-
query: {
9587-
pretty?: string;
9588-
};
9589-
path: {
9590-
name: string;
9591-
namespace: string;
9592-
};
9593-
}
9594-
export interface ReplaceEventsV1NamespacedEventRequest {
9595-
query: {
9596-
pretty?: string;
9597-
dryRun?: string;
9598-
fieldManager?: string;
9599-
};
9600-
path: {
9601-
name: string;
9602-
namespace: string;
9603-
};
9604-
body: Event;
9605-
}
9606-
export interface DeleteEventsV1NamespacedEventRequest {
9607-
query: {
9608-
pretty?: string;
9609-
dryRun?: string;
9610-
gracePeriodSeconds?: number;
9611-
orphanDependents?: boolean;
9612-
propagationPolicy?: string;
9613-
};
9614-
path: {
9615-
name: string;
9616-
namespace: string;
9617-
};
9618-
}
9619-
export interface PatchEventsV1NamespacedEventRequest {
9620-
query: {
9621-
pretty?: string;
9622-
dryRun?: string;
9623-
fieldManager?: string;
9624-
force?: boolean;
9625-
};
9626-
path: {
9627-
name: string;
9628-
namespace: string;
9629-
};
9630-
body: Patch;
9631-
}
9632-
export interface WatchEventsV1EventListForAllNamespacesRequest {
9633-
query: {
9634-
allowWatchBookmarks?: boolean;
9635-
continue?: string;
9636-
fieldSelector?: string;
9637-
labelSelector?: string;
9638-
limit?: number;
9639-
pretty?: string;
9640-
resourceVersion?: string;
9641-
resourceVersionMatch?: string;
9642-
timeoutSeconds?: number;
9643-
watch?: boolean;
9644-
};
9645-
}
9646-
export interface WatchEventsV1NamespacedEventListRequest {
9647-
query: {
9648-
allowWatchBookmarks?: boolean;
9649-
continue?: string;
9650-
fieldSelector?: string;
9651-
labelSelector?: string;
9652-
limit?: number;
9653-
pretty?: string;
9654-
resourceVersion?: string;
9655-
resourceVersionMatch?: string;
9656-
timeoutSeconds?: number;
9657-
watch?: boolean;
9658-
};
9659-
path: {
9660-
namespace: string;
9661-
};
9662-
}
9663-
export interface WatchEventsV1NamespacedEventRequest {
9664-
query: {
9665-
allowWatchBookmarks?: boolean;
9666-
continue?: string;
9667-
fieldSelector?: string;
9668-
labelSelector?: string;
9669-
limit?: number;
9670-
pretty?: string;
9671-
resourceVersion?: string;
9672-
resourceVersionMatch?: string;
9673-
timeoutSeconds?: number;
9674-
watch?: boolean;
9675-
};
9676-
path: {
9677-
name: string;
9678-
namespace: string;
9679-
};
9680-
}
96819524
export interface GetFlowcontrolApiserverAPIGroupRequest {}
96829525
export interface GetNetworkingAPIGroupRequest {}
96839526
export interface GetNetworkingV1APIResourcesRequest {}
@@ -13495,50 +13338,6 @@ export class KubernetesClient extends APIClient {
1349513338
const path = `/apis/events.k8s.io/v1/`;
1349613339
return await this.get<APIResourceList>(path, null, null, opts);
1349713340
}
13498-
async listEventsV1EventForAllNamespaces(params: ListEventsV1EventForAllNamespacesRequest, opts?: APIClientRequestOpts): Promise<EventList> {
13499-
const path = `/apis/events.k8s.io/v1/events`;
13500-
return await this.get<EventList>(path, null, null, opts);
13501-
}
13502-
async listEventsV1NamespacedEvent(params: ListEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<EventList> {
13503-
const path = `/apis/events.k8s.io/v1/namespaces/${params.path.namespace}/events`;
13504-
return await this.get<EventList>(path, params.query, null, opts);
13505-
}
13506-
async createEventsV1NamespacedEvent(params: CreateEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Event> {
13507-
const path = `/apis/events.k8s.io/v1/namespaces/${params.path.namespace}/events`;
13508-
return await this.post<Event>(path, params.query, params.body, opts);
13509-
}
13510-
async deleteEventsV1CollectionNamespacedEvent(params: DeleteEventsV1CollectionNamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Status> {
13511-
const path = `/apis/events.k8s.io/v1/namespaces/${params.path.namespace}/events`;
13512-
return await this.delete<Status>(path, params.query, null, opts);
13513-
}
13514-
async readEventsV1NamespacedEvent(params: ReadEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Event> {
13515-
const path = `/apis/events.k8s.io/v1/namespaces/${params.path.namespace}/events/${params.path.name}`;
13516-
return await this.get<Event>(path, null, null, opts);
13517-
}
13518-
async replaceEventsV1NamespacedEvent(params: ReplaceEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Event> {
13519-
const path = `/apis/events.k8s.io/v1/namespaces/${params.path.namespace}/events/${params.path.name}`;
13520-
return await this.put<Event>(path, params.query, params.body, opts);
13521-
}
13522-
async deleteEventsV1NamespacedEvent(params: DeleteEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Status> {
13523-
const path = `/apis/events.k8s.io/v1/namespaces/${params.path.namespace}/events/${params.path.name}`;
13524-
return await this.delete<Status>(path, params.query, null, opts);
13525-
}
13526-
async patchEventsV1NamespacedEvent(params: PatchEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<Event> {
13527-
const path = `/apis/events.k8s.io/v1/namespaces/${params.path.namespace}/events/${params.path.name}`;
13528-
return await this.patch<Event>(path, params.query, params.body, opts);
13529-
}
13530-
async watchEventsV1EventListForAllNamespaces(params: WatchEventsV1EventListForAllNamespacesRequest, opts?: APIClientRequestOpts): Promise<WatchEvent> {
13531-
const path = `/apis/events.k8s.io/v1/watch/events`;
13532-
return await this.get<WatchEvent>(path, null, null, opts);
13533-
}
13534-
async watchEventsV1NamespacedEventList(params: WatchEventsV1NamespacedEventListRequest, opts?: APIClientRequestOpts): Promise<WatchEvent> {
13535-
const path = `/apis/events.k8s.io/v1/watch/namespaces/${params.path.namespace}/events`;
13536-
return await this.get<WatchEvent>(path, null, null, opts);
13537-
}
13538-
async watchEventsV1NamespacedEvent(params: WatchEventsV1NamespacedEventRequest, opts?: APIClientRequestOpts): Promise<WatchEvent> {
13539-
const path = `/apis/events.k8s.io/v1/watch/namespaces/${params.path.namespace}/events/${params.path.name}`;
13540-
return await this.get<WatchEvent>(path, null, null, opts);
13541-
}
1354213341
async getFlowcontrolApiserverAPIGroup(params: GetFlowcontrolApiserverAPIGroupRequest, opts?: APIClientRequestOpts): Promise<APIGroup> {
1354313342
const path = `/apis/flowcontrol.apiserver.k8s.io/`;
1354413343
return await this.get<APIGroup>(path, null, null, opts);

0 commit comments

Comments
 (0)