@@ -229,14 +229,8 @@ public struct DocumentationNode {
229229 ?? . init( availability: [ ] )
230230 }
231231
232- let endpointVariants = DocumentationDataVariants (
233- symbolData: unifiedSymbol. mixins,
234- platformName: platformName
235- ) { mixins -> HTTPEndpointSection ? in
236- if let endpoint = mixins [ SymbolGraph . Symbol. HTTP. Endpoint. mixinKey] as? SymbolGraph . Symbol . HTTP . Endpoint {
237- return HTTPEndpointSection ( endpoint: endpoint)
238- }
239- return nil
232+ let endpointSection = unifiedSymbol. defaultSymbol ? [ mixin: SymbolGraph . Symbol. HTTP. Endpoint. self] . map { endpoint in
233+ HTTPEndpointSection ( endpoint: endpoint)
240234 }
241235
242236 let overloadVariants = DocumentationDataVariants (
@@ -314,13 +308,13 @@ public struct DocumentationNode {
314308 seeAlsoVariants: . empty,
315309 returnsSectionVariants: . empty,
316310 parametersSectionVariants: . empty,
317- dictionaryKeysSectionVariants : . empty ,
318- possibleValuesSectionVariants : . empty ,
319- httpEndpointSectionVariants : endpointVariants ,
320- httpBodySectionVariants : . empty ,
321- httpParametersSectionVariants : . empty ,
322- httpResponsesSectionVariants : . empty ,
323- redirectsVariants : . empty ,
311+ dictionaryKeysSection : nil ,
312+ possibleValuesSection : nil ,
313+ httpEndpointSection : endpointSection ,
314+ httpBodySection : nil ,
315+ httpParametersSection : nil ,
316+ httpResponsesSection : nil ,
317+ redirects : nil ,
324318 crossImportOverlayModule: moduleData. bystanders. map ( { ( moduleData. name, $0) } ) ,
325319 overloadsVariants: overloadVariants
326320 )
@@ -399,9 +393,7 @@ public struct DocumentationNode {
399393 semantic. deprecatedSummaryVariants = DocumentationDataVariants (
400394 defaultVariantValue: deprecated
401395 )
402- semantic. redirectsVariants = DocumentationDataVariants (
403- defaultVariantValue: documentationExtension? . redirects
404- )
396+ semantic. redirects = documentationExtension? . redirects
405397
406398 let filter = ParametersAndReturnValidator ( diagnosticEngine: engine, docChunkSources: docChunks. map ( \. source) )
407399 let ( parametersSectionVariants, returnsSectionVariants) = filter. makeParametersAndReturnsSections (
@@ -415,22 +407,22 @@ public struct DocumentationNode {
415407
416408 if let keys = markupModel. discussionTags? . dictionaryKeys, !keys. isEmpty {
417409 // Record the keys extracted from the markdown
418- semantic. dictionaryKeysSectionVariants [ . fallback ] = DictionaryKeysSection ( dictionaryKeys: keys)
410+ semantic. dictionaryKeysSection = DictionaryKeysSection ( dictionaryKeys: keys)
419411 }
420412
421413 if let parameters = markupModel. discussionTags? . httpParameters, !parameters. isEmpty {
422414 // Record the parameters extracted from the markdown
423- semantic. httpParametersSectionVariants [ . fallback ] = HTTPParametersSection ( parameters: parameters)
415+ semantic. httpParametersSection = HTTPParametersSection ( parameters: parameters)
424416 }
425417
426418 if let body = markupModel. discussionTags? . httpBody {
427419 // Record the body extracted from the markdown
428- semantic. httpBodySectionVariants [ . fallback ] = HTTPBodySection ( body: body)
420+ semantic. httpBodySection = HTTPBodySection ( body: body)
429421 }
430422
431423 if let responses = markupModel. discussionTags? . httpResponses, !responses. isEmpty {
432424 // Record the responses extracted from the markdown
433- semantic. httpResponsesSectionVariants [ . fallback ] = HTTPResponsesSection ( responses: responses)
425+ semantic. httpResponsesSection = HTTPResponsesSection ( responses: responses)
434426 }
435427
436428 // The property list symbol's allowed values.
@@ -467,10 +459,10 @@ public struct DocumentationNode {
467459 }
468460
469461 // Record the possible values extracted from the markdown.
470- semantic. possibleValuesSectionVariants [ . fallback ] = PropertyListPossibleValuesSection ( possibleValues: knownPossibleValues)
462+ semantic. possibleValuesSection = PropertyListPossibleValuesSection ( possibleValues: knownPossibleValues)
471463 } else if let symbolAllowedValues {
472464 // Record the symbol possible values even if none are documented.
473- semantic. possibleValuesSectionVariants [ . fallback ] = PropertyListPossibleValuesSection ( possibleValues: symbolAllowedValues. value. map {
465+ semantic. possibleValuesSection = PropertyListPossibleValuesSection ( possibleValues: symbolAllowedValues. value. map {
474466 PropertyListPossibleValuesSection . PossibleValue ( value: String ( $0) , contents: [ ] )
475467 } )
476468 }
@@ -778,13 +770,13 @@ public struct DocumentationNode {
778770 seeAlsoVariants: . init( swiftVariant: markupModel. seeAlsoSection) ,
779771 returnsSectionVariants: . init( swiftVariant: markupModel. discussionTags. flatMap ( { $0. returns. isEmpty ? nil : ReturnsSection ( content: $0. returns [ 0 ] . contents) } ) ) ,
780772 parametersSectionVariants: . init( swiftVariant: markupModel. discussionTags. flatMap ( { $0. parameters. isEmpty ? nil : ParametersSection ( parameters: $0. parameters) } ) ) ,
781- dictionaryKeysSectionVariants : . init ( swiftVariant : markupModel. discussionTags. flatMap ( { $0. dictionaryKeys. isEmpty ? nil : DictionaryKeysSection ( dictionaryKeys: $0. dictionaryKeys) } ) ) ,
782- possibleValuesSectionVariants : . init ( swiftVariant : markupModel. discussionTags. flatMap ( { $0. possiblePropertyListValues. isEmpty ? nil : PropertyListPossibleValuesSection ( possibleValues: $0. possiblePropertyListValues) } ) ) ,
783- httpEndpointSectionVariants : . empty ,
784- httpBodySectionVariants : . empty ,
785- httpParametersSectionVariants : . empty ,
786- httpResponsesSectionVariants : . empty ,
787- redirectsVariants : . init ( swiftVariant : article? . redirects)
773+ dictionaryKeysSection : markupModel. discussionTags. flatMap ( { $0. dictionaryKeys. isEmpty ? nil : DictionaryKeysSection ( dictionaryKeys: $0. dictionaryKeys) } ) ,
774+ possibleValuesSection : markupModel. discussionTags. flatMap ( { $0. possiblePropertyListValues. isEmpty ? nil : PropertyListPossibleValuesSection ( possibleValues: $0. possiblePropertyListValues) } ) ,
775+ httpEndpointSection : nil ,
776+ httpBodySection : nil ,
777+ httpParametersSection : nil ,
778+ httpResponsesSection : nil ,
779+ redirects : article? . redirects
788780 )
789781
790782 self . isVirtual = symbol. isVirtual
0 commit comments