@@ -82,9 +82,6 @@ export async function getSwaggerContentFromUrl(swaggerUrl: string): Promise<any>
8282 }
8383}
8484
85- /**
86- * GitHub helper: get latest commit SHA for azure-rest-api-specs main branch
87- */
8885export async function getSpecsHeadCommitSha ( branch : string = 'main' ) : Promise < string > {
8986 const url = `${ GITHUB_API_BASE } /repos/${ REST_API_SPECS_OWNER } /${ REST_API_SPECS_REPO } /branches/${ branch } ` ;
9087 const res = await fetch ( url ) ;
@@ -95,9 +92,6 @@ export async function getSpecsHeadCommitSha(branch: string = 'main'): Promise<st
9592 return data ?. commit ?. sha as string ;
9693}
9794
98- /**
99- * List top-level service directories under specification/
100- */
10195export async function listSpecModules ( ) : Promise < string [ ] > {
10296 const url = `${ GITHUB_API_BASE } /repos/${ REST_API_SPECS_OWNER } /${ REST_API_SPECS_REPO } /contents/specification` ;
10397 const res = await fetch ( url ) ;
@@ -111,9 +105,6 @@ export async function listSpecModules(): Promise<string[]> {
111105 . sort ( ( a : string , b : string ) => a . localeCompare ( b ) ) ;
112106}
113107
114- /**
115- * Given a service (spec folder), list provider namespaces under resource-manager.
116- */
117108export async function listProvidersForService ( service : string ) : Promise < string [ ] > {
118109 const url = `${ GITHUB_API_BASE } /repos/${ REST_API_SPECS_OWNER } /${ REST_API_SPECS_REPO } /contents/specification/${ service } /resource-manager` ;
119110 const res = await fetch ( url ) ;
@@ -128,10 +119,6 @@ export async function listProvidersForService(service: string): Promise<string[]
128119 . sort ( ( a : string , b : string ) => a . localeCompare ( b ) ) ;
129120}
130121
131- /**
132- * For service + provider, list API version directories under stable/ and preview/.
133- * Returns map: { stable: string[], preview: string[] }
134- */
135122export async function listApiVersions ( service : string , provider : string ) : Promise < { stable : string [ ] ; preview : string [ ] } > {
136123 const base = `specification/${ service } /resource-manager/${ provider } ` ;
137124 const folders = [ 'stable' , 'preview' ] as const ;
@@ -153,10 +140,6 @@ export async function listApiVersions(service: string, provider: string): Promis
153140 return result ;
154141}
155142
156- /**
157- * For a given service/provider/version, find likely swagger files (.json) under that version path.
158- * Returns array of repo-relative file paths (starting with specification/...).
159- */
160143export async function listSwaggerFiles ( service : string , provider : string , stability : 'stable' | 'preview' , version : string ) : Promise < string [ ] > {
161144 const dir = `specification/${ service } /resource-manager/${ provider } /${ stability } /${ version } ` ;
162145 const url = `${ GITHUB_API_BASE } /repos/${ REST_API_SPECS_OWNER } /${ REST_API_SPECS_REPO } /contents/${ dir } ` ;
@@ -173,9 +156,6 @@ export async function listSwaggerFiles(service: string, provider: string, stabil
173156 return ordered ;
174157}
175158
176- /**
177- * Resolve the four Autorest inputs given service, provider, and version path.
178- */
179159export async function resolveAutorestInputs ( params : {
180160 service : string ;
181161 provider : string ;
0 commit comments