File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,7 +235,14 @@ async ValueTask<Option<BinaryData>> getSpecificationContents(ResourceKey resourc
235235
236236 var downloadUriResult = from exportResult in await pipeline . GetContent ( exportUri , cancellationToken )
237237 from exportJson in JsonObjectModule . From ( exportResult )
238- from value in exportJson . GetJsonObjectProperty ( "value" )
238+ from value in resource switch
239+ {
240+ ApiResource => exportJson . GetJsonObjectProperty ( "value" ) ,
241+ WorkspaceApiResource => from properties in exportJson . GetJsonObjectProperty ( "properties" )
242+ from value in properties . GetJsonObjectProperty ( "value" )
243+ select value ,
244+ _ => throw new InvalidOperationException ( $ "Resource '{ resourceKey . Resource } ' does not support API specifications.")
245+ }
239246 from link in value . GetStringProperty ( "link" )
240247 select new Uri ( link ) ;
241248 var downloadUri = downloadUriResult . IfErrorThrow ( ) ;
You can’t perform that action at this time.
0 commit comments