mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 12:32:26 -05:00 
			
		
		
		
	[chore] Bump go swagger (#2871)
* bump go swagger version * bump swagger version
This commit is contained in:
		
					parent
					
						
							
								3a369d834a
							
						
					
				
			
			
				commit
				
					
						fd8a724e77
					
				
			
		
					 251 changed files with 10841 additions and 11896 deletions
				
			
		
							
								
								
									
										4
									
								
								vendor/github.com/go-openapi/analysis/internal/debug/debug.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/go-openapi/analysis/internal/debug/debug.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -29,7 +29,7 @@ var ( | |||
| // GetLogger provides a prefix debug logger | ||||
| func GetLogger(prefix string, debug bool) func(string, ...interface{}) { | ||||
| 	if debug { | ||||
| 		logger := log.New(output, fmt.Sprintf("%s:", prefix), log.LstdFlags) | ||||
| 		logger := log.New(output, prefix+":", log.LstdFlags) | ||||
| 
 | ||||
| 		return func(msg string, args ...interface{}) { | ||||
| 			_, file1, pos1, _ := runtime.Caller(1) | ||||
|  | @ -37,5 +37,5 @@ func GetLogger(prefix string, debug bool) func(string, ...interface{}) { | |||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	return func(msg string, args ...interface{}) {} | ||||
| 	return func(_ string, _ ...interface{}) {} | ||||
| } | ||||
|  |  | |||
							
								
								
									
										42
									
								
								vendor/github.com/go-openapi/analysis/internal/flatten/replace/replace.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										42
									
								
								vendor/github.com/go-openapi/analysis/internal/flatten/replace/replace.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -1,6 +1,7 @@ | |||
| package replace | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| 	"fmt" | ||||
| 	"net/url" | ||||
| 	"os" | ||||
|  | @ -40,6 +41,8 @@ func RewriteSchemaToRef(sp *spec.Swagger, key string, ref spec.Ref) error { | |||
| 		if refable.Schema != nil { | ||||
| 			refable.Schema = &spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} | ||||
| 		} | ||||
| 	case map[string]interface{}: // this happens e.g. if a schema points to an extension unmarshaled as map[string]interface{} | ||||
| 		return rewriteParentRef(sp, key, ref) | ||||
| 	default: | ||||
| 		return fmt.Errorf("no schema with ref found at %s for %T", key, value) | ||||
| 	} | ||||
|  | @ -120,6 +123,9 @@ func rewriteParentRef(sp *spec.Swagger, key string, ref spec.Ref) error { | |||
| 	case spec.SchemaProperties: | ||||
| 		container[entry] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} | ||||
| 
 | ||||
| 	case *interface{}: | ||||
| 		*container = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} | ||||
| 
 | ||||
| 	// NOTE: can't have case *spec.SchemaOrBool = parent in this case is *Schema | ||||
| 
 | ||||
| 	default: | ||||
|  | @ -318,8 +324,8 @@ type DeepestRefResult struct { | |||
| } | ||||
| 
 | ||||
| // DeepestRef finds the first definition ref, from a cascade of nested refs which are not definitions. | ||||
| //  - if no definition is found, returns the deepest ref. | ||||
| //  - pointers to external files are expanded | ||||
| //   - if no definition is found, returns the deepest ref. | ||||
| //   - pointers to external files are expanded | ||||
| // | ||||
| // NOTE: all external $ref's are assumed to be already expanded at this stage. | ||||
| func DeepestRef(sp *spec.Swagger, opts *spec.ExpandOptions, ref spec.Ref) (*DeepestRefResult, error) { | ||||
|  | @ -385,8 +391,9 @@ DOWNREF: | |||
| 			err := asSchema.UnmarshalJSON(asJSON) | ||||
| 			if err != nil { | ||||
| 				return nil, | ||||
| 					fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T", | ||||
| 						currentRef.String(), value) | ||||
| 					fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T (%v)", | ||||
| 						currentRef.String(), value, err, | ||||
| 					) | ||||
| 			} | ||||
| 			warnings = append(warnings, fmt.Sprintf("found $ref %q (response) interpreted as schema", currentRef.String())) | ||||
| 
 | ||||
|  | @ -402,8 +409,9 @@ DOWNREF: | |||
| 			var asSchema spec.Schema | ||||
| 			if err := asSchema.UnmarshalJSON(asJSON); err != nil { | ||||
| 				return nil, | ||||
| 					fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T", | ||||
| 						currentRef.String(), value) | ||||
| 					fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T (%v)", | ||||
| 						currentRef.String(), value, err, | ||||
| 					) | ||||
| 			} | ||||
| 
 | ||||
| 			warnings = append(warnings, fmt.Sprintf("found $ref %q (parameter) interpreted as schema", currentRef.String())) | ||||
|  | @ -414,9 +422,25 @@ DOWNREF: | |||
| 			currentRef = asSchema.Ref | ||||
| 
 | ||||
| 		default: | ||||
| 			return nil, | ||||
| 				fmt.Errorf("unhandled type to resolve JSON pointer %s. Expected a Schema, got: %T", | ||||
| 					currentRef.String(), value) | ||||
| 			// fallback: attempts to resolve the pointer as a schema | ||||
| 			if refable == nil { | ||||
| 				break DOWNREF | ||||
| 			} | ||||
| 
 | ||||
| 			asJSON, _ := json.Marshal(refable) | ||||
| 			var asSchema spec.Schema | ||||
| 			if err := asSchema.UnmarshalJSON(asJSON); err != nil { | ||||
| 				return nil, | ||||
| 					fmt.Errorf("unhandled type to resolve JSON pointer %s. Expected a Schema, got: %T (%v)", | ||||
| 						currentRef.String(), value, err, | ||||
| 					) | ||||
| 			} | ||||
| 			warnings = append(warnings, fmt.Sprintf("found $ref %q (%T) interpreted as schema", currentRef.String(), refable)) | ||||
| 
 | ||||
| 			if asSchema.Ref.String() == "" { | ||||
| 				break DOWNREF | ||||
| 			} | ||||
| 			currentRef = asSchema.Ref | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										2
									
								
								vendor/github.com/go-openapi/analysis/internal/flatten/sortref/keys.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/go-openapi/analysis/internal/flatten/sortref/keys.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -69,7 +69,7 @@ func KeyParts(key string) SplitKey { | |||
| 	return res | ||||
| } | ||||
| 
 | ||||
| // SplitKey holds of the parts of a /-separated key, soi that their location may be determined. | ||||
| // SplitKey holds of the parts of a /-separated key, so that their location may be determined. | ||||
| type SplitKey []string | ||||
| 
 | ||||
| // IsDefinition is true when the split key is in the #/definitions section of a spec | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue