File tree Expand file tree Collapse file tree 4 files changed +8
-0
lines changed
packages/docusaurus-plugin-openapi-docs/src Expand file tree Collapse file tree 4 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -222,12 +222,16 @@ const config: Config = {
222
222
version : "2.0.0" , // Current version
223
223
label : "v2.0.0" , // Current version label
224
224
baseUrl : "/petstore_versioned/swagger-petstore-yaml" , // Leading slash is important
225
+ downloadUrl :
226
+ "https://raw.githubusercontent.com/PaloAltoNetworks/docusaurus-openapi-docs/main/demo/examples/petstore.yaml" ,
225
227
versions : {
226
228
"1.0.0" : {
227
229
specPath : "examples/petstore-1.0.0.yaml" ,
228
230
outputDir : "docs/petstore_versioned/1.0.0" , // No trailing slash
229
231
label : "v1.0.0" ,
230
232
baseUrl : "/petstore_versioned/1.0.0/swagger-petstore-yaml" , // Leading slash is important
233
+ downloadUrl :
234
+ "https://redocly.com/_spec/docs/openapi/petstore.json" ,
231
235
} ,
232
236
} ,
233
237
} satisfies OpenApiPlugin . Options ,
Original file line number Diff line number Diff line change @@ -531,6 +531,7 @@ custom_edit_url: null
531
531
version : version ,
532
532
label : metadata . label ,
533
533
baseUrl : metadata . baseUrl ,
534
+ downloadUrl : metadata . downloadUrl ,
534
535
} ) ;
535
536
}
536
537
@@ -685,6 +686,7 @@ custom_edit_url: null
685
686
delete parentConfig . version ;
686
687
delete parentConfig . label ;
687
688
delete parentConfig . baseUrl ;
689
+ delete parentConfig . downloadUrl ;
688
690
689
691
// TODO: handle when no versions are defined by version command is passed
690
692
if ( versionId === "all" ) {
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ export const OptionsSchema = Joi.object({
59
59
outputDir : Joi . string ( ) . required ( ) ,
60
60
label : Joi . string ( ) . required ( ) ,
61
61
baseUrl : Joi . string ( ) . required ( ) ,
62
+ downloadUrl : Joi . string ( ) ,
62
63
} )
63
64
) ,
64
65
} )
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ export interface APIVersionOptions {
70
70
outputDir : string ;
71
71
label : string ;
72
72
baseUrl : string ;
73
+ downloadUrl ?: string ;
73
74
}
74
75
75
76
export interface LoadedContent {
You can’t perform that action at this time.
0 commit comments