File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
tools/cli/internal/openapi/sunset Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -116,15 +116,16 @@ func successResponseExtensions(responsesMap map[string]*openapi3.ResponseRef) ma
116116// with the oldest date in their keys.
117117//
118118// The function sorts content keys by date (in YYYY-MM-DD format) if present, with older dates taking
119- // precedence. If multiple keys contain dates, it selects the entry with the earliest date. If no dates
120- // are found, it selects the first content entry that would sort before entries with dates.
119+ // precedence. If multiple keys contain dates, it selects the entry with the earliest date.
121120//
122121// Parameters:
123122// - content: An OpenAPI content map with media types as keys and schema objects as values
124123//
125124// Returns:
126125// - A map of extension names to their values from the selected content entry,
127126// or nil if the content map is empty or the selected entry has no extensions
127+ //
128+ // Assumption: the older version will have the earliest sunset date.
128129func contentExtensions (content openapi3.Content ) map [string ]any {
129130 keysContent := slices .Collect (maps .Keys (content ))
130131 // Regex to find a date in YYYY-MM-DD format.
You can’t perform that action at this time.
0 commit comments