diff --git a/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/ir.test.ts.snap b/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/ir.test.ts.snap index 16d71c758d6..899dc277978 100644 --- a/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/ir.test.ts.snap +++ b/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/ir.test.ts.snap @@ -404,88 +404,91 @@ func do() { " `; -exports[`test definitions > csharp-namespace-conflict 1`] = ` +exports[`test definitions > csharp-grpc-proto 1`] = ` "package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" ) func do() { client := client.NewClient() - client.Tasktest.Hello( + client.Userservice.Create( context.TODO(), + &acme.CreateRequest{}, ) } -" -`; -exports[`test definitions > custom-auth 1`] = ` -"package example +------------------------ + +package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithCustomAuthScheme( - "", - ), - ) - client.CustomAuth.GetWithCustomAuth( + client := client.NewClient() + client.Userservice.Create( context.TODO(), + &acme.CreateRequest{ + Username: acme.String( + "username", + ), + Email: acme.String( + "email", + ), + Age: acme.Int( + 1, + ), + Weight: acme.Float64( + 1.1, + ), + Metadata: &acme.Metadata{ + StringMetadataValueMap: map[string]*acme.MetadataValue{ + "metadata": &acme.MetadataValue{ + Double: 1.1, + }, + }, + }, + }, ) } +" +`; ------------------------- - -package example +exports[`test definitions > csharp-grpc-proto-exhaustive 1`] = ` +"package example import ( context "context" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithCustomAuthScheme( - "", - ), - ) - client.CustomAuth.PostWithCustomAuth( + client := client.NewClient() + client.Dataservice.Foo( context.TODO(), - map[string]interface{}{ - "key": "value", - }, ) } -" -`; -exports[`test definitions > enum 1`] = ` -"package example +------------------------ + +package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" ) func do() { client := client.NewClient() - client.InlinedRequest.Send( + client.Dataservice.Foo( context.TODO(), - &acme.SendEnumInlinedRequest{ - Operand: acme.OperandGreaterThan, - OperandOrColor: &acme.ColorOrOperand{ - Color: acme.ColorRed, - }, - }, ) } @@ -501,16 +504,16 @@ import ( func do() { client := client.NewClient() - client.InlinedRequest.Send( + client.Dataservice.Upload( context.TODO(), - &acme.SendEnumInlinedRequest{ - Operand: acme.OperandGreaterThan, - MaybeOperand: acme.OperandGreaterThan.Ptr(), - OperandOrColor: &acme.ColorOrOperand{ - Color: acme.ColorRed, - }, - MaybeOperandOrColor: &acme.ColorOrOperand{ - Color: acme.ColorRed, + &acme.UploadRequest{ + Columns: []*acme.Column{ + &acme.Column{ + ID: "id", + Values: []float64{ + 1.1, + }, + }, }, }, ) @@ -528,11 +531,62 @@ import ( func do() { client := client.NewClient() - client.PathParam.Send( + client.Dataservice.Upload( context.TODO(), - acme.OperandGreaterThan, - &acme.ColorOrOperand{ - Color: acme.ColorRed, + &acme.UploadRequest{ + Columns: []*acme.Column{ + &acme.Column{ + ID: "id", + Values: []float64{ + 1.1, + 1.1, + }, + Metadata: &acme.Metadata{ + StringMetadataValueMap: map[string]*acme.MetadataValue{ + "metadata": &acme.MetadataValue{ + Double: 1.1, + }, + }, + }, + IndexedData: &acme.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, + }, + &acme.Column{ + ID: "id", + Values: []float64{ + 1.1, + 1.1, + }, + Metadata: &acme.Metadata{ + StringMetadataValueMap: map[string]*acme.MetadataValue{ + "metadata": &acme.MetadataValue{ + Double: 1.1, + }, + }, + }, + IndexedData: &acme.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, + }, + }, + Namespace: acme.String( + "namespace", + ), }, ) } @@ -549,12 +603,9 @@ import ( func do() { client := client.NewClient() - client.PathParam.Send( + client.Dataservice.Delete( context.TODO(), - acme.OperandGreaterThan, - &acme.ColorOrOperand{ - Color: acme.ColorRed, - }, + &acme.DeleteRequest{}, ) } @@ -570,12 +621,25 @@ import ( func do() { client := client.NewClient() - client.QueryParam.Send( + client.Dataservice.Delete( context.TODO(), - &acme.SendEnumAsQueryParamRequest{ - Operand: acme.OperandGreaterThan, - OperandOrColor: &acme.ColorOrOperand{ - Color: acme.ColorRed, + &acme.DeleteRequest{ + IDs: []string{ + "ids", + "ids", + }, + DeleteAll: acme.Bool( + true, + ), + Namespace: acme.String( + "namespace", + ), + Filter: &acme.Metadata{ + StringMetadataValueMap: map[string]*acme.MetadataValue{ + "filter": &acme.MetadataValue{ + Double: 1.1, + }, + }, }, }, ) @@ -593,15 +657,9 @@ import ( func do() { client := client.NewClient() - client.QueryParam.Send( + client.Dataservice.Describe( context.TODO(), - &acme.SendEnumAsQueryParamRequest{ - Operand: acme.OperandGreaterThan, - MaybeOperand: acme.OperandGreaterThan.Ptr(), - OperandOrColor: &acme.ColorOrOperand{ - Color: acme.ColorRed, - }, - }, + &acme.DescribeRequest{}, ) } @@ -617,62 +675,62 @@ import ( func do() { client := client.NewClient() - client.QueryParam.SendList( + client.Dataservice.Describe( context.TODO(), - &acme.SendEnumListAsQueryParamRequest{ - Operand: []acme.Operand{ - acme.OperandGreaterThan, - }, - MaybeOperand: []*acme.Operand{ - acme.OperandGreaterThan.Ptr(), - }, - OperandOrColor: []*acme.ColorOrOperand{ - &acme.ColorOrOperand{ - Color: acme.ColorRed, + &acme.DescribeRequest{ + Filter: &acme.Metadata{ + StringMetadataValueMap: map[string]*acme.MetadataValue{ + "filter": &acme.MetadataValue{ + Double: 1.1, + }, }, }, - MaybeOperandOrColor: []*acme.ColorOrOperand{}, }, ) } -" -`; -exports[`test definitions > error-property 1`] = ` -"package example +------------------------ + +package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" ) func do() { client := client.NewClient() - client.PropertyBasedError.ThrowError( + client.Dataservice.Fetch( context.TODO(), + &acme.FetchRequest{}, ) } -" -`; -exports[`test definitions > examples 1`] = ` -"package example +------------------------ + +package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Echo( + client := client.NewClient() + client.Dataservice.Fetch( context.TODO(), - "Hello world!\\n\\nwith\\n\\tnewlines", + &acme.FetchRequest{ + IDs: []*string{ + acme.String( + "ids", + ), + }, + Namespace: acme.String( + "namespace", + ), + }, ) } @@ -682,19 +740,15 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Echo( + client := client.NewClient() + client.Dataservice.List( context.TODO(), - "string", + &acme.ListRequest{}, ) } @@ -704,19 +758,28 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Echo( + client := client.NewClient() + client.Dataservice.List( context.TODO(), - "primitive", + &acme.ListRequest{ + Prefix: acme.String( + "prefix", + ), + Limit: acme.Int( + 1, + ), + PaginationToken: acme.String( + "paginationToken", + ), + Namespace: acme.String( + "namespace", + ), + }, ) } @@ -726,19 +789,17 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.File.Notification.Service.GetException( + client := client.NewClient() + client.Dataservice.Query( context.TODO(), - "notification-hsy129x", + &acme.QueryRequest{ + TopK: 1, + }, ) } @@ -748,19 +809,110 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.File.Notification.Service.GetException( + client := client.NewClient() + client.Dataservice.Query( context.TODO(), - "notificationId", + &acme.QueryRequest{ + Namespace: acme.String( + "namespace", + ), + TopK: 1, + Filter: &acme.Metadata{ + StringMetadataValueMap: map[string]*acme.MetadataValue{ + "filter": &acme.MetadataValue{ + Double: 1.1, + }, + }, + }, + IncludeValues: acme.Bool( + true, + ), + IncludeMetadata: acme.Bool( + true, + ), + Queries: []*acme.QueryColumn{ + &acme.QueryColumn{ + Values: []float64{ + 1.1, + 1.1, + }, + TopK: acme.Int( + 1, + ), + Namespace: acme.String( + "namespace", + ), + Filter: &acme.Metadata{ + StringMetadataValueMap: map[string]*acme.MetadataValue{ + "filter": &acme.MetadataValue{ + Double: 1.1, + }, + }, + }, + IndexedData: &acme.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, + }, + &acme.QueryColumn{ + Values: []float64{ + 1.1, + 1.1, + }, + TopK: acme.Int( + 1, + ), + Namespace: acme.String( + "namespace", + ), + Filter: &acme.Metadata{ + StringMetadataValueMap: map[string]*acme.MetadataValue{ + "filter": &acme.MetadataValue{ + Double: 1.1, + }, + }, + }, + IndexedData: &acme.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, + }, + }, + Column: []float64{ + 1.1, + 1.1, + }, + ID: acme.String( + "id", + ), + IndexedData: &acme.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, + }, ) } @@ -770,22 +922,16 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - file "github.com/acme/acme-go/file" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.File.Service.GetFile( + client := client.NewClient() + client.Dataservice.Update( context.TODO(), - "file.txt", - &file.GetFileRequest{ - XFileAPIVersion: "0.0.2", + &acme.UpdateRequest{ + ID: "id", }, ) } @@ -796,51 +942,65 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - file "github.com/acme/acme-go/file" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.File.Service.GetFile( + client := client.NewClient() + client.Dataservice.Update( context.TODO(), - "filename", - &file.GetFileRequest{ - XFileAPIVersion: "X-File-API-Version", + &acme.UpdateRequest{ + ID: "id", + Values: []float64{ + 1.1, + 1.1, + }, + SetMetadata: &acme.Metadata{ + StringMetadataValueMap: map[string]*acme.MetadataValue{ + "setMetadata": &acme.MetadataValue{ + Double: 1.1, + }, + }, + }, + Namespace: acme.String( + "namespace", + ), + IndexedData: &acme.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, }, ) } +" +`; ------------------------- - -package example +exports[`test definitions > csharp-namespace-conflict 1`] = ` +"package example import ( context "context" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Health.Service.Check( + client := client.NewClient() + client.Tasktest.Hello( context.TODO(), - "id-2sdx82h", ) } +" +`; ------------------------- - -package example +exports[`test definitions > custom-auth 1`] = ` +"package example import ( context "context" @@ -850,13 +1010,12 @@ import ( func do() { client := client.NewClient( - option.WithToken( - "", + option.WithCustomAuthScheme( + "", ), ) - client.Health.Service.Check( + client.CustomAuth.GetWithCustomAuth( context.TODO(), - "id-3tey93i", ) } @@ -872,34 +1031,66 @@ import ( func do() { client := client.NewClient( - option.WithToken( - "", + option.WithCustomAuthScheme( + "", ), ) - client.Health.Service.Check( + client.CustomAuth.PostWithCustomAuth( context.TODO(), - "id", + map[string]interface{}{ + "key": "value", + }, ) } +" +`; ------------------------- +exports[`test definitions > enum 1`] = ` +"package example + +import ( + context "context" + acme "github.com/acme/acme-go" + client "github.com/acme/acme-go/client" +) + +func do() { + client := client.NewClient() + client.InlinedRequest.Send( + context.TODO(), + &acme.SendEnumInlinedRequest{ + Operand: acme.OperandGreaterThan, + OperandOrColor: &acme.ColorOrOperand{ + Color: acme.ColorRed, + }, + }, + ) +} + +------------------------ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Health.Service.Ping( + client := client.NewClient() + client.InlinedRequest.Send( context.TODO(), + &acme.SendEnumInlinedRequest{ + Operand: acme.OperandGreaterThan, + MaybeOperand: acme.OperandGreaterThan.Ptr(), + OperandOrColor: &acme.ColorOrOperand{ + Color: acme.ColorRed, + }, + MaybeOperandOrColor: &acme.ColorOrOperand{ + Color: acme.ColorRed, + }, + }, ) } @@ -909,18 +1100,39 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), + client := client.NewClient() + client.PathParam.Send( + context.TODO(), + acme.OperandGreaterThan, + &acme.ColorOrOperand{ + Color: acme.ColorRed, + }, ) - client.Health.Service.Ping( +} + +------------------------ + +package example + +import ( + context "context" + acme "github.com/acme/acme-go" + client "github.com/acme/acme-go/client" +) + +func do() { + client := client.NewClient() + client.PathParam.Send( context.TODO(), + acme.OperandGreaterThan, + &acme.ColorOrOperand{ + Color: acme.ColorRed, + }, ) } @@ -930,19 +1142,44 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithToken( - "", - ), + client := client.NewClient() + client.QueryParam.Send( + context.TODO(), + &acme.SendEnumAsQueryParamRequest{ + Operand: acme.OperandGreaterThan, + OperandOrColor: &acme.ColorOrOperand{ + Color: acme.ColorRed, + }, + }, ) - client.Service.GetMovie( +} + +------------------------ + +package example + +import ( + context "context" + acme "github.com/acme/acme-go" + client "github.com/acme/acme-go/client" +) + +func do() { + client := client.NewClient() + client.QueryParam.Send( context.TODO(), - "movie-c06a4ad7", + &acme.SendEnumAsQueryParamRequest{ + Operand: acme.OperandGreaterThan, + MaybeOperand: acme.OperandGreaterThan.Ptr(), + OperandOrColor: &acme.ColorOrOperand{ + Color: acme.ColorRed, + }, + }, ) } @@ -950,6 +1187,55 @@ func do() { package example +import ( + context "context" + acme "github.com/acme/acme-go" + client "github.com/acme/acme-go/client" +) + +func do() { + client := client.NewClient() + client.QueryParam.SendList( + context.TODO(), + &acme.SendEnumListAsQueryParamRequest{ + Operand: []acme.Operand{ + acme.OperandGreaterThan, + }, + MaybeOperand: []*acme.Operand{ + acme.OperandGreaterThan.Ptr(), + }, + OperandOrColor: []*acme.ColorOrOperand{ + &acme.ColorOrOperand{ + Color: acme.ColorRed, + }, + }, + MaybeOperandOrColor: []*acme.ColorOrOperand{}, + }, + ) +} +" +`; + +exports[`test definitions > error-property 1`] = ` +"package example + +import ( + context "context" + client "github.com/acme/acme-go/client" +) + +func do() { + client := client.NewClient() + client.PropertyBasedError.ThrowError( + context.TODO(), + ) +} +" +`; + +exports[`test definitions > examples 1`] = ` +"package example + import ( context "context" client "github.com/acme/acme-go/client" @@ -962,9 +1248,9 @@ func do() { "", ), ) - client.Service.GetMovie( + client.Echo( context.TODO(), - "movieId", + "Hello world!\\n\\nwith\\n\\tnewlines", ) } @@ -974,7 +1260,6 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" ) @@ -985,31 +1270,9 @@ func do() { "", ), ) - client.Service.CreateMovie( + client.Echo( context.TODO(), - &acme.Movie{ - ID: "movie-c06a4ad7", - Prequel: acme.String( - "movie-cv9b914f", - ), - Title: "The Boy and the Heron", - From: "Hayao Miyazaki", - Rating: 8, - Tag: "tag-wf9as23d", - Metadata: map[string]interface{}{ - "actors": []interface{}{ - "Christian Bale", - "Florence Pugh", - "Willem Dafoe", - }, - "releaseDate": "2023-12-08", - "ratings": map[string]interface{}{ - "rottenTomatoes": 97, - "imdb": 7.6, - }, - }, - Revenue: 1000000, - }, + "string", ) } @@ -1019,7 +1282,6 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" ) @@ -1030,27 +1292,9 @@ func do() { "", ), ) - client.Service.CreateMovie( + client.Echo( context.TODO(), - &acme.Movie{ - ID: "id", - Prequel: acme.String( - "prequel", - ), - Title: "title", - From: "from", - Rating: 1.1, - Tag: "tag", - Book: acme.String( - "book", - ), - Metadata: map[string]interface{}{ - "metadata": map[string]interface{}{ - "key": "value", - }, - }, - Revenue: 1000000, - }, + "primitive", ) } @@ -1060,7 +1304,6 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" ) @@ -1071,19 +1314,9 @@ func do() { "", ), ) - client.Service.GetMetadata( + client.File.Notification.Service.GetException( context.TODO(), - &acme.GetMetadataRequest{ - Shallow: acme.Bool( - false, - ), - Tag: []*string{ - acme.String( - "development", - ), - }, - XAPIVersion: "0.0.1", - }, + "notification-hsy129x", ) } @@ -1093,7 +1326,6 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" ) @@ -1104,19 +1336,9 @@ func do() { "", ), ) - client.Service.GetMetadata( + client.File.Notification.Service.GetException( context.TODO(), - &acme.GetMetadataRequest{ - Shallow: acme.Bool( - true, - ), - Tag: []*string{ - acme.String( - "tag", - ), - }, - XAPIVersion: "X-API-Version", - }, + "notificationId", ) } @@ -1126,11 +1348,9 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - commons "github.com/acme/acme-go/commons" + file "github.com/acme/acme-go/file" option "github.com/acme/acme-go/option" - uuid "github.com/google/uuid" ) func do() { @@ -1139,230 +1359,23 @@ func do() { "", ), ) - client.Service.CreateBigEntity( + client.File.Service.GetFile( context.TODO(), - &acme.BigEntity{ - CastMember: &acme.CastMember{ - Actor: &acme.Actor{ - Name: "name", - ID: "id", - }, - }, - ExtendedMovie: &acme.ExtendedMovie{ - Cast: []string{ - "cast", - "cast", - }, - }, - Entity: &acme.Entity{ - Type: &acme.Type{ - BasicType: acme.BasicTypePrimitive, - }, - Name: "name", - }, - Metadata: &acme.Metadata{}, - CommonMetadata: &commons.Metadata{ - ID: "id", - Data: map[string]string{ - "data": "data", - }, - JSONString: acme.String( - "jsonString", - ), - }, - EventInfo: &commons.EventInfo{ - Metadata: &commons.Metadata{ - ID: "id", - Data: map[string]string{ - "data": "data", - }, - JSONString: acme.String( - "jsonString", - ), - }, - }, - Data: &commons.Data{}, - Migration: &acme.Migration{ - Name: "name", - Status: acme.MigrationStatusRunning, - }, - Exception: &acme.Exception{ - Generic: &acme.ExceptionInfo{ - ExceptionType: "exceptionType", - ExceptionMessage: "exceptionMessage", - ExceptionStacktrace: "exceptionStacktrace", - }, - }, - Test: &acme.Test{}, - Node: &acme.Node{ - Name: "name", - Nodes: []*acme.Node{ - &acme.Node{ - Name: "name", - Nodes: []*acme.Node{ - &acme.Node{ - Name: "name", - Nodes: []*acme.Node{}, - Trees: []*acme.Tree{}, - }, - &acme.Node{ - Name: "name", - Nodes: []*acme.Node{}, - Trees: []*acme.Tree{}, - }, - }, - Trees: []*acme.Tree{ - &acme.Tree{ - Nodes: []*acme.Node{}, - }, - &acme.Tree{ - Nodes: []*acme.Node{}, - }, - }, - }, - &acme.Node{ - Name: "name", - Nodes: []*acme.Node{ - &acme.Node{ - Name: "name", - Nodes: []*acme.Node{}, - Trees: []*acme.Tree{}, - }, - &acme.Node{ - Name: "name", - Nodes: []*acme.Node{}, - Trees: []*acme.Tree{}, - }, - }, - Trees: []*acme.Tree{ - &acme.Tree{ - Nodes: []*acme.Node{}, - }, - &acme.Tree{ - Nodes: []*acme.Node{}, - }, - }, - }, - }, - Trees: []*acme.Tree{ - &acme.Tree{ - Nodes: []*acme.Node{ - &acme.Node{ - Name: "name", - Nodes: []*acme.Node{}, - Trees: []*acme.Tree{}, - }, - &acme.Node{ - Name: "name", - Nodes: []*acme.Node{}, - Trees: []*acme.Tree{}, - }, - }, - }, - &acme.Tree{ - Nodes: []*acme.Node{ - &acme.Node{ - Name: "name", - Nodes: []*acme.Node{}, - Trees: []*acme.Tree{}, - }, - &acme.Node{ - Name: "name", - Nodes: []*acme.Node{}, - Trees: []*acme.Tree{}, - }, - }, - }, - }, - }, - Directory: &acme.Directory{ - Name: "name", - Files: []*acme.File{ - &acme.File{ - Name: "name", - Contents: "contents", - }, - &acme.File{ - Name: "name", - Contents: "contents", - }, - }, - Directories: []*acme.Directory{ - &acme.Directory{ - Name: "name", - Files: []*acme.File{ - &acme.File{ - Name: "name", - Contents: "contents", - }, - &acme.File{ - Name: "name", - Contents: "contents", - }, - }, - Directories: []*acme.Directory{ - &acme.Directory{ - Name: "name", - Files: []*acme.File{}, - Directories: []*acme.Directory{}, - }, - &acme.Directory{ - Name: "name", - Files: []*acme.File{}, - Directories: []*acme.Directory{}, - }, - }, - }, - &acme.Directory{ - Name: "name", - Files: []*acme.File{ - &acme.File{ - Name: "name", - Contents: "contents", - }, - &acme.File{ - Name: "name", - Contents: "contents", - }, - }, - Directories: []*acme.Directory{ - &acme.Directory{ - Name: "name", - Files: []*acme.File{}, - Directories: []*acme.Directory{}, - }, - &acme.Directory{ - Name: "name", - Files: []*acme.File{}, - Directories: []*acme.Directory{}, - }, - }, - }, - }, - }, - Moment: &acme.Moment{ - ID: uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - ), - Date: acme.MustParseDateTime( - "2023-01-15", - ), - Datetime: acme.MustParseDateTime( - "2024-01-15T09:30:00Z", - ), - }, + "file.txt", + &file.GetFileRequest{ + XFileAPIVersion: "0.0.2", }, ) } -" -`; -exports[`test definitions > exhaustive 1`] = ` -"package example +------------------------ + +package example import ( context "context" client "github.com/acme/acme-go/client" + file "github.com/acme/acme-go/file" option "github.com/acme/acme-go/option" ) @@ -1372,11 +1385,11 @@ func do() { "", ), ) - client.Endpoints.Container.GetAndReturnListOfPrimitives( + client.File.Service.GetFile( context.TODO(), - []string{ - "string", - "string", + "filename", + &file.GetFileRequest{ + XFileAPIVersion: "X-File-API-Version", }, ) } @@ -1389,7 +1402,6 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" ) func do() { @@ -1398,16 +1410,9 @@ func do() { "", ), ) - client.Endpoints.Container.GetAndReturnListOfObjects( + client.Health.Service.Check( context.TODO(), - []*types.ObjectWithRequiredField{ - &types.ObjectWithRequiredField{ - String: "string", - }, - &types.ObjectWithRequiredField{ - String: "string", - }, - }, + "id-2sdx82h", ) } @@ -1427,11 +1432,9 @@ func do() { "", ), ) - client.Endpoints.Container.GetAndReturnSetOfPrimitives( + client.Health.Service.Check( context.TODO(), - []string{ - "string", - }, + "id-3tey93i", ) } @@ -1443,7 +1446,6 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" ) func do() { @@ -1452,13 +1454,9 @@ func do() { "", ), ) - client.Endpoints.Container.GetAndReturnSetOfObjects( + client.Health.Service.Check( context.TODO(), - []*types.ObjectWithRequiredField{ - &types.ObjectWithRequiredField{ - String: "string", - }, - }, + "id", ) } @@ -1478,11 +1476,8 @@ func do() { "", ), ) - client.Endpoints.Container.GetAndReturnMapPrimToPrim( + client.Health.Service.Ping( context.TODO(), - map[string]string{ - "string": "string", - }, ) } @@ -1494,7 +1489,6 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" ) func do() { @@ -1503,13 +1497,8 @@ func do() { "", ), ) - client.Endpoints.Container.GetAndReturnMapOfPrimToObject( + client.Health.Service.Ping( context.TODO(), - map[string]*types.ObjectWithRequiredField{ - "string": &types.ObjectWithRequiredField{ - String: "string", - }, - }, ) } @@ -1521,7 +1510,6 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" ) func do() { @@ -1530,11 +1518,9 @@ func do() { "", ), ) - client.Endpoints.Container.GetAndReturnOptional( + client.Service.GetMovie( context.TODO(), - &types.ObjectWithRequiredField{ - String: "string", - }, + "movie-c06a4ad7", ) } @@ -1546,7 +1532,6 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" ) func do() { @@ -1555,9 +1540,9 @@ func do() { "", ), ) - client.Endpoints.Enum.GetAndReturnEnum( + client.Service.GetMovie( context.TODO(), - types.WeatherReportSunny, + "movieId", ) } @@ -1567,6 +1552,7 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" ) @@ -1577,9 +1563,31 @@ func do() { "", ), ) - client.Endpoints.HTTPMethods.TestGet( + client.Service.CreateMovie( context.TODO(), - "id", + &acme.Movie{ + ID: "movie-c06a4ad7", + Prequel: acme.String( + "movie-cv9b914f", + ), + Title: "The Boy and the Heron", + From: "Hayao Miyazaki", + Rating: 8, + Tag: "tag-wf9as23d", + Metadata: map[string]interface{}{ + "actors": []interface{}{ + "Christian Bale", + "Florence Pugh", + "Willem Dafoe", + }, + "releaseDate": "2023-12-08", + "ratings": map[string]interface{}{ + "rottenTomatoes": 97, + "imdb": 7.6, + }, + }, + Revenue: 1000000, + }, ) } @@ -1589,9 +1597,9 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" ) func do() { @@ -1600,10 +1608,26 @@ func do() { "", ), ) - client.Endpoints.HTTPMethods.TestPost( + client.Service.CreateMovie( context.TODO(), - &types.ObjectWithRequiredField{ - String: "string", + &acme.Movie{ + ID: "id", + Prequel: acme.String( + "prequel", + ), + Title: "title", + From: "from", + Rating: 1.1, + Tag: "tag", + Book: acme.String( + "book", + ), + Metadata: map[string]interface{}{ + "metadata": map[string]interface{}{ + "key": "value", + }, + }, + Revenue: 1000000, }, ) } @@ -1614,9 +1638,9 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" ) func do() { @@ -1625,11 +1649,18 @@ func do() { "", ), ) - client.Endpoints.HTTPMethods.TestPut( + client.Service.GetMetadata( context.TODO(), - "id", - &types.ObjectWithRequiredField{ - String: "string", + &acme.GetMetadataRequest{ + Shallow: acme.Bool( + false, + ), + Tag: []*string{ + acme.String( + "development", + ), + }, + XAPIVersion: "0.0.1", }, ) } @@ -1643,8 +1674,6 @@ import ( acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" - uuid "github.com/google/uuid" ) func do() { @@ -1653,54 +1682,18 @@ func do() { "", ), ) - client.Endpoints.HTTPMethods.TestPatch( + client.Service.GetMetadata( context.TODO(), - "id", - &types.ObjectWithOptionalField{ - String: acme.String( - "string", - ), - Integer: acme.Int( - 1, - ), - Long: acme.Int64( - 1000000, - ), - Double: acme.Float64( - 1.1, - ), - Bool: acme.Bool( + &acme.GetMetadataRequest{ + Shallow: acme.Bool( true, ), - Datetime: acme.Time( - acme.MustParseDateTime( - "2024-01-15T09:30:00Z", - ), - ), - Date: acme.Time( - acme.MustParseDateTime( - "2023-01-15", - ), - ), - UUID: acme.UUID( - uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Tag: []*string{ + acme.String( + "tag", ), - ), - Base64: []byte("SGVsbG8gd29ybGQh"), - List: []string{ - "list", - "list", - }, - Set: []string{ - "set", - }, - Map: map[int]string{ - 1: "map", }, - Bigint: acme.String( - "1000000", - ), + XAPIVersion: "X-API-Version", }, ) } @@ -1709,34 +1702,12 @@ func do() { package example -import ( - context "context" - client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" -) - -func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Endpoints.HTTPMethods.TestDelete( - context.TODO(), - "id", - ) -} - ------------------------- - -package example - import ( context "context" acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" + commons "github.com/acme/acme-go/commons" option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" uuid "github.com/google/uuid" ) @@ -1746,380 +1717,244 @@ func do() { "", ), ) - client.Endpoints.Object.GetAndReturnWithOptionalField( + client.Service.CreateBigEntity( context.TODO(), - &types.ObjectWithOptionalField{ - String: acme.String( - "string", - ), - Integer: acme.Int( - 1, - ), - Long: acme.Int64( - 1000000, - ), - Double: acme.Float64( - 1.1, - ), - Bool: acme.Bool( - true, - ), - Datetime: acme.Time( - acme.MustParseDateTime( - "2024-01-15T09:30:00Z", - ), - ), - Date: acme.Time( - acme.MustParseDateTime( - "2023-01-15", - ), - ), - UUID: acme.UUID( - uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + &acme.BigEntity{ + CastMember: &acme.CastMember{ + Actor: &acme.Actor{ + Name: "name", + ID: "id", + }, + }, + ExtendedMovie: &acme.ExtendedMovie{ + Cast: []string{ + "cast", + "cast", + }, + }, + Entity: &acme.Entity{ + Type: &acme.Type{ + BasicType: acme.BasicTypePrimitive, + }, + Name: "name", + }, + Metadata: &acme.Metadata{}, + CommonMetadata: &commons.Metadata{ + ID: "id", + Data: map[string]string{ + "data": "data", + }, + JSONString: acme.String( + "jsonString", ), - ), - Base64: []byte("SGVsbG8gd29ybGQh"), - List: []string{ - "list", - "list", }, - Set: []string{ - "set", + EventInfo: &commons.EventInfo{ + Metadata: &commons.Metadata{ + ID: "id", + Data: map[string]string{ + "data": "data", + }, + JSONString: acme.String( + "jsonString", + ), + }, }, - Map: map[int]string{ - 1: "map", + Data: &commons.Data{}, + Migration: &acme.Migration{ + Name: "name", + Status: acme.MigrationStatusRunning, }, - Bigint: acme.String( - "1000000", - ), - }, - ) -} - ------------------------- - -package example - -import ( - context "context" - client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" -) - -func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Endpoints.Object.GetAndReturnWithRequiredField( - context.TODO(), - &types.ObjectWithRequiredField{ - String: "string", - }, - ) -} - ------------------------- - -package example - -import ( - context "context" - client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" -) - -func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Endpoints.Object.GetAndReturnWithMapOfMap( - context.TODO(), - &types.ObjectWithMapOfMap{ - Map: map[string]map[string]string{ - "map": map[string]string{ - "map": "map", - }, - }, - }, - ) -} - ------------------------- - -package example - -import ( - context "context" - acme "github.com/acme/acme-go" - client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" - uuid "github.com/google/uuid" -) - -func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Endpoints.Object.GetAndReturnNestedWithOptionalField( - context.TODO(), - &types.NestedObjectWithOptionalField{ - String: acme.String( - "string", - ), - NestedObject: &types.ObjectWithOptionalField{ - String: acme.String( - "string", - ), - Integer: acme.Int( - 1, - ), - Long: acme.Int64( - 1000000, - ), - Double: acme.Float64( - 1.1, - ), - Bool: acme.Bool( - true, - ), - Datetime: acme.Time( - acme.MustParseDateTime( - "2024-01-15T09:30:00Z", - ), - ), - Date: acme.Time( - acme.MustParseDateTime( - "2023-01-15", - ), - ), - UUID: acme.UUID( - uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - ), - ), - Base64: []byte("SGVsbG8gd29ybGQh"), - List: []string{ - "list", - "list", - }, - Set: []string{ - "set", - }, - Map: map[int]string{ - 1: "map", - }, - Bigint: acme.String( - "1000000", - ), - }, - }, - ) -} - ------------------------- - -package example - -import ( - context "context" - acme "github.com/acme/acme-go" - client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" - uuid "github.com/google/uuid" -) - -func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Endpoints.Object.GetAndReturnNestedWithRequiredField( - context.TODO(), - "string", - &types.NestedObjectWithRequiredField{ - String: "string", - NestedObject: &types.ObjectWithOptionalField{ - String: acme.String( - "string", - ), - Integer: acme.Int( - 1, - ), - Long: acme.Int64( - 1000000, - ), - Double: acme.Float64( - 1.1, - ), - Bool: acme.Bool( - true, - ), - Datetime: acme.Time( - acme.MustParseDateTime( - "2024-01-15T09:30:00Z", - ), - ), - Date: acme.Time( - acme.MustParseDateTime( - "2023-01-15", - ), - ), - UUID: acme.UUID( - uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - ), - ), - Base64: []byte("SGVsbG8gd29ybGQh"), - List: []string{ - "list", - "list", - }, - Set: []string{ - "set", - }, - Map: map[int]string{ - 1: "map", + Exception: &acme.Exception{ + Generic: &acme.ExceptionInfo{ + ExceptionType: "exceptionType", + ExceptionMessage: "exceptionMessage", + ExceptionStacktrace: "exceptionStacktrace", }, - Bigint: acme.String( - "1000000", - ), }, - }, - ) -} - ------------------------- - -package example - -import ( - context "context" - acme "github.com/acme/acme-go" - client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" - types "github.com/acme/acme-go/types" - uuid "github.com/google/uuid" -) - -func do() { - client := client.NewClient( - option.WithToken( - "", - ), - ) - client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsList( - context.TODO(), - []*types.NestedObjectWithRequiredField{ - &types.NestedObjectWithRequiredField{ - String: "string", - NestedObject: &types.ObjectWithOptionalField{ - String: acme.String( - "string", - ), - Integer: acme.Int( - 1, - ), - Long: acme.Int64( - 1000000, - ), - Double: acme.Float64( - 1.1, - ), - Bool: acme.Bool( - true, - ), - Datetime: acme.Time( - acme.MustParseDateTime( - "2024-01-15T09:30:00Z", - ), - ), - Date: acme.Time( - acme.MustParseDateTime( - "2023-01-15", - ), - ), - UUID: acme.UUID( - uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - ), - ), - Base64: []byte("SGVsbG8gd29ybGQh"), - List: []string{ - "list", - "list", + Test: &acme.Test{}, + Node: &acme.Node{ + Name: "name", + Nodes: []*acme.Node{ + &acme.Node{ + Name: "name", + Nodes: []*acme.Node{ + &acme.Node{ + Name: "name", + Nodes: []*acme.Node{}, + Trees: []*acme.Tree{}, + }, + &acme.Node{ + Name: "name", + Nodes: []*acme.Node{}, + Trees: []*acme.Tree{}, + }, + }, + Trees: []*acme.Tree{ + &acme.Tree{ + Nodes: []*acme.Node{}, + }, + &acme.Tree{ + Nodes: []*acme.Node{}, + }, + }, }, - Set: []string{ - "set", + &acme.Node{ + Name: "name", + Nodes: []*acme.Node{ + &acme.Node{ + Name: "name", + Nodes: []*acme.Node{}, + Trees: []*acme.Tree{}, + }, + &acme.Node{ + Name: "name", + Nodes: []*acme.Node{}, + Trees: []*acme.Tree{}, + }, + }, + Trees: []*acme.Tree{ + &acme.Tree{ + Nodes: []*acme.Node{}, + }, + &acme.Tree{ + Nodes: []*acme.Node{}, + }, + }, }, - Map: map[int]string{ - 1: "map", + }, + Trees: []*acme.Tree{ + &acme.Tree{ + Nodes: []*acme.Node{ + &acme.Node{ + Name: "name", + Nodes: []*acme.Node{}, + Trees: []*acme.Tree{}, + }, + &acme.Node{ + Name: "name", + Nodes: []*acme.Node{}, + Trees: []*acme.Tree{}, + }, + }, + }, + &acme.Tree{ + Nodes: []*acme.Node{ + &acme.Node{ + Name: "name", + Nodes: []*acme.Node{}, + Trees: []*acme.Tree{}, + }, + &acme.Node{ + Name: "name", + Nodes: []*acme.Node{}, + Trees: []*acme.Tree{}, + }, + }, }, - Bigint: acme.String( - "1000000", - ), }, }, - &types.NestedObjectWithRequiredField{ - String: "string", - NestedObject: &types.ObjectWithOptionalField{ - String: acme.String( - "string", - ), - Integer: acme.Int( - 1, - ), - Long: acme.Int64( - 1000000, - ), - Double: acme.Float64( - 1.1, - ), - Bool: acme.Bool( - true, - ), - Datetime: acme.Time( - acme.MustParseDateTime( - "2024-01-15T09:30:00Z", - ), - ), - Date: acme.Time( - acme.MustParseDateTime( - "2023-01-15", - ), - ), - UUID: acme.UUID( - uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - ), - ), - Base64: []byte("SGVsbG8gd29ybGQh"), - List: []string{ - "list", - "list", + Directory: &acme.Directory{ + Name: "name", + Files: []*acme.File{ + &acme.File{ + Name: "name", + Contents: "contents", }, - Set: []string{ - "set", + &acme.File{ + Name: "name", + Contents: "contents", }, - Map: map[int]string{ - 1: "map", + }, + Directories: []*acme.Directory{ + &acme.Directory{ + Name: "name", + Files: []*acme.File{ + &acme.File{ + Name: "name", + Contents: "contents", + }, + &acme.File{ + Name: "name", + Contents: "contents", + }, + }, + Directories: []*acme.Directory{ + &acme.Directory{ + Name: "name", + Files: []*acme.File{}, + Directories: []*acme.Directory{}, + }, + &acme.Directory{ + Name: "name", + Files: []*acme.File{}, + Directories: []*acme.Directory{}, + }, + }, + }, + &acme.Directory{ + Name: "name", + Files: []*acme.File{ + &acme.File{ + Name: "name", + Contents: "contents", + }, + &acme.File{ + Name: "name", + Contents: "contents", + }, + }, + Directories: []*acme.Directory{ + &acme.Directory{ + Name: "name", + Files: []*acme.File{}, + Directories: []*acme.Directory{}, + }, + &acme.Directory{ + Name: "name", + Files: []*acme.File{}, + Directories: []*acme.Directory{}, + }, + }, }, - Bigint: acme.String( - "1000000", - ), }, }, + Moment: &acme.Moment{ + ID: uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + Date: acme.MustParseDateTime( + "2023-01-15", + ), + Datetime: acme.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + }, + }, + ) +} +" +`; + +exports[`test definitions > exhaustive 1`] = ` +"package example + +import ( + context "context" + client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" +) + +func do() { + client := client.NewClient( + option.WithToken( + "", + ), + ) + client.Endpoints.Container.GetAndReturnListOfPrimitives( + context.TODO(), + []string{ + "string", + "string", }, ) } @@ -2132,6 +1967,7 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" ) func do() { @@ -2140,9 +1976,16 @@ func do() { "", ), ) - client.Endpoints.Params.GetWithPath( + client.Endpoints.Container.GetAndReturnListOfObjects( context.TODO(), - "param", + []*types.ObjectWithRequiredField{ + &types.ObjectWithRequiredField{ + String: "string", + }, + &types.ObjectWithRequiredField{ + String: "string", + }, + }, ) } @@ -2153,7 +1996,6 @@ package example import ( context "context" client "github.com/acme/acme-go/client" - endpoints "github.com/acme/acme-go/endpoints" option "github.com/acme/acme-go/option" ) @@ -2163,11 +2005,10 @@ func do() { "", ), ) - client.Endpoints.Params.GetWithQuery( + client.Endpoints.Container.GetAndReturnSetOfPrimitives( context.TODO(), - &endpoints.GetWithQuery{ - Query: "query", - Number: 1, + []string{ + "string", }, ) } @@ -2179,8 +2020,8 @@ package example import ( context "context" client "github.com/acme/acme-go/client" - endpoints "github.com/acme/acme-go/endpoints" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" ) func do() { @@ -2189,14 +2030,11 @@ func do() { "", ), ) - client.Endpoints.Params.GetWithAllowMultipleQuery( + client.Endpoints.Container.GetAndReturnSetOfObjects( context.TODO(), - &endpoints.GetWithMultipleQuery{ - Query: []string{ - "query", - }, - Numer: []int{ - 1, + []*types.ObjectWithRequiredField{ + &types.ObjectWithRequiredField{ + String: "string", }, }, ) @@ -2209,7 +2047,6 @@ package example import ( context "context" client "github.com/acme/acme-go/client" - endpoints "github.com/acme/acme-go/endpoints" option "github.com/acme/acme-go/option" ) @@ -2219,11 +2056,10 @@ func do() { "", ), ) - client.Endpoints.Params.GetWithPathAndQuery( + client.Endpoints.Container.GetAndReturnMapPrimToPrim( context.TODO(), - "param", - &endpoints.GetWithPathAndQuery{ - Query: "query", + map[string]string{ + "string": "string", }, ) } @@ -2236,6 +2072,7 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" ) func do() { @@ -2244,10 +2081,13 @@ func do() { "", ), ) - client.Endpoints.Params.ModifyWithPath( + client.Endpoints.Container.GetAndReturnMapOfPrimToObject( context.TODO(), - "param", - "string", + map[string]*types.ObjectWithRequiredField{ + "string": &types.ObjectWithRequiredField{ + String: "string", + }, + }, ) } @@ -2259,6 +2099,7 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" ) func do() { @@ -2267,9 +2108,11 @@ func do() { "", ), ) - client.Endpoints.Primitive.GetAndReturnString( + client.Endpoints.Container.GetAndReturnOptional( context.TODO(), - "string", + &types.ObjectWithRequiredField{ + String: "string", + }, ) } @@ -2281,6 +2124,7 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" ) func do() { @@ -2289,9 +2133,9 @@ func do() { "", ), ) - client.Endpoints.Primitive.GetAndReturnInt( + client.Endpoints.Enum.GetAndReturnEnum( context.TODO(), - 1, + types.WeatherReportSunny, ) } @@ -2311,9 +2155,9 @@ func do() { "", ), ) - client.Endpoints.Primitive.GetAndReturnLong( + client.Endpoints.HTTPMethods.TestGet( context.TODO(), - 1000000, + "id", ) } @@ -2325,6 +2169,7 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" ) func do() { @@ -2333,9 +2178,11 @@ func do() { "", ), ) - client.Endpoints.Primitive.GetAndReturnDouble( + client.Endpoints.HTTPMethods.TestPost( context.TODO(), - 1.1, + &types.ObjectWithRequiredField{ + String: "string", + }, ) } @@ -2347,6 +2194,7 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" ) func do() { @@ -2355,9 +2203,12 @@ func do() { "", ), ) - client.Endpoints.Primitive.GetAndReturnBool( + client.Endpoints.HTTPMethods.TestPut( context.TODO(), - true, + "id", + &types.ObjectWithRequiredField{ + String: "string", + }, ) } @@ -2370,6 +2221,8 @@ import ( acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" + uuid "github.com/google/uuid" ) func do() { @@ -2378,12 +2231,148 @@ func do() { "", ), ) - client.Endpoints.Primitive.GetAndReturnDatetime( + client.Endpoints.HTTPMethods.TestPatch( context.TODO(), - acme.MustParseDateTime( - "2024-01-15T09:30:00Z", + "id", + &types.ObjectWithOptionalField{ + String: acme.String( + "string", + ), + Integer: acme.Int( + 1, + ), + Long: acme.Int64( + 1000000, + ), + Double: acme.Float64( + 1.1, + ), + Bool: acme.Bool( + true, + ), + Datetime: acme.Time( + acme.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + ), + Date: acme.Time( + acme.MustParseDateTime( + "2023-01-15", + ), + ), + UUID: acme.UUID( + uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + ), + Base64: []byte("SGVsbG8gd29ybGQh"), + List: []string{ + "list", + "list", + }, + Set: []string{ + "set", + }, + Map: map[int]string{ + 1: "map", + }, + Bigint: acme.String( + "1000000", + ), + }, + ) +} + +------------------------ + +package example + +import ( + context "context" + client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" +) + +func do() { + client := client.NewClient( + option.WithToken( + "", + ), + ) + client.Endpoints.HTTPMethods.TestDelete( + context.TODO(), + "id", + ) +} + +------------------------ + +package example + +import ( + context "context" + acme "github.com/acme/acme-go" + client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" + uuid "github.com/google/uuid" +) + +func do() { + client := client.NewClient( + option.WithToken( + "", ), ) + client.Endpoints.Object.GetAndReturnWithOptionalField( + context.TODO(), + &types.ObjectWithOptionalField{ + String: acme.String( + "string", + ), + Integer: acme.Int( + 1, + ), + Long: acme.Int64( + 1000000, + ), + Double: acme.Float64( + 1.1, + ), + Bool: acme.Bool( + true, + ), + Datetime: acme.Time( + acme.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + ), + Date: acme.Time( + acme.MustParseDateTime( + "2023-01-15", + ), + ), + UUID: acme.UUID( + uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + ), + Base64: []byte("SGVsbG8gd29ybGQh"), + List: []string{ + "list", + "list", + }, + Set: []string{ + "set", + }, + Map: map[int]string{ + 1: "map", + }, + Bigint: acme.String( + "1000000", + ), + }, + ) } ------------------------ @@ -2392,9 +2381,9 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" ) func do() { @@ -2403,11 +2392,11 @@ func do() { "", ), ) - client.Endpoints.Primitive.GetAndReturnDate( + client.Endpoints.Object.GetAndReturnWithRequiredField( context.TODO(), - acme.MustParseDateTime( - "2023-01-15", - ), + &types.ObjectWithRequiredField{ + String: "string", + }, ) } @@ -2419,7 +2408,7 @@ import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" - uuid "github.com/google/uuid" + types "github.com/acme/acme-go/types" ) func do() { @@ -2428,11 +2417,15 @@ func do() { "", ), ) - client.Endpoints.Primitive.GetAndReturnUUID( + client.Endpoints.Object.GetAndReturnWithMapOfMap( context.TODO(), - uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - ), + &types.ObjectWithMapOfMap{ + Map: map[string]map[string]string{ + "map": map[string]string{ + "map": "map", + }, + }, + }, ) } @@ -2442,8 +2435,11 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" + uuid "github.com/google/uuid" ) func do() { @@ -2452,9 +2448,59 @@ func do() { "", ), ) - client.Endpoints.Primitive.GetAndReturnBase64( + client.Endpoints.Object.GetAndReturnNestedWithOptionalField( context.TODO(), - []byte("SGVsbG8gd29ybGQh"), + &types.NestedObjectWithOptionalField{ + String: acme.String( + "string", + ), + NestedObject: &types.ObjectWithOptionalField{ + String: acme.String( + "string", + ), + Integer: acme.Int( + 1, + ), + Long: acme.Int64( + 1000000, + ), + Double: acme.Float64( + 1.1, + ), + Bool: acme.Bool( + true, + ), + Datetime: acme.Time( + acme.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + ), + Date: acme.Time( + acme.MustParseDateTime( + "2023-01-15", + ), + ), + UUID: acme.UUID( + uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + ), + Base64: []byte("SGVsbG8gd29ybGQh"), + List: []string{ + "list", + "list", + }, + Set: []string{ + "set", + }, + Map: map[int]string{ + 1: "map", + }, + Bigint: acme.String( + "1000000", + ), + }, + }, ) } @@ -2464,9 +2510,11 @@ package example import ( context "context" + acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" types "github.com/acme/acme-go/types" + uuid "github.com/google/uuid" ) func do() { @@ -2475,12 +2523,56 @@ func do() { "", ), ) - client.Endpoints.Union.GetAndReturnUnion( + client.Endpoints.Object.GetAndReturnNestedWithRequiredField( context.TODO(), - &types.Animal{ - Dog: &types.Dog{ - Name: "name", - LikesToWoof: true, + "string", + &types.NestedObjectWithRequiredField{ + String: "string", + NestedObject: &types.ObjectWithOptionalField{ + String: acme.String( + "string", + ), + Integer: acme.Int( + 1, + ), + Long: acme.Int64( + 1000000, + ), + Double: acme.Float64( + 1.1, + ), + Bool: acme.Bool( + true, + ), + Datetime: acme.Time( + acme.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + ), + Date: acme.Time( + acme.MustParseDateTime( + "2023-01-15", + ), + ), + UUID: acme.UUID( + uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + ), + Base64: []byte("SGVsbG8gd29ybGQh"), + List: []string{ + "list", + "list", + }, + Set: []string{ + "set", + }, + Map: map[int]string{ + 1: "map", + }, + Bigint: acme.String( + "1000000", + ), }, }, ) @@ -2505,56 +2597,106 @@ func do() { "", ), ) - client.InlinedRequests.PostWithObjectBodyandResponse( + client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsList( context.TODO(), - &acme.PostWithObjectBody{ - String: "string", - Integer: 1, - NestedObject: &types.ObjectWithOptionalField{ - String: acme.String( - "string", - ), - Integer: acme.Int( - 1, - ), - Long: acme.Int64( - 1000000, - ), - Double: acme.Float64( - 1.1, - ), - Bool: acme.Bool( - true, - ), - Datetime: acme.Time( - acme.MustParseDateTime( - "2024-01-15T09:30:00Z", + []*types.NestedObjectWithRequiredField{ + &types.NestedObjectWithRequiredField{ + String: "string", + NestedObject: &types.ObjectWithOptionalField{ + String: acme.String( + "string", + ), + Integer: acme.Int( + 1, + ), + Long: acme.Int64( + 1000000, + ), + Double: acme.Float64( + 1.1, + ), + Bool: acme.Bool( + true, + ), + Datetime: acme.Time( + acme.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + ), + Date: acme.Time( + acme.MustParseDateTime( + "2023-01-15", + ), + ), + UUID: acme.UUID( + uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + ), + Base64: []byte("SGVsbG8gd29ybGQh"), + List: []string{ + "list", + "list", + }, + Set: []string{ + "set", + }, + Map: map[int]string{ + 1: "map", + }, + Bigint: acme.String( + "1000000", + ), + }, + }, + &types.NestedObjectWithRequiredField{ + String: "string", + NestedObject: &types.ObjectWithOptionalField{ + String: acme.String( + "string", + ), + Integer: acme.Int( + 1, + ), + Long: acme.Int64( + 1000000, + ), + Double: acme.Float64( + 1.1, + ), + Bool: acme.Bool( + true, + ), + Datetime: acme.Time( + acme.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + ), + Date: acme.Time( + acme.MustParseDateTime( + "2023-01-15", + ), ), - ), - Date: acme.Time( - acme.MustParseDateTime( - "2023-01-15", + UUID: acme.UUID( + uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), ), - ), - UUID: acme.UUID( - uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64: []byte("SGVsbG8gd29ybGQh"), + List: []string{ + "list", + "list", + }, + Set: []string{ + "set", + }, + Map: map[int]string{ + 1: "map", + }, + Bigint: acme.String( + "1000000", ), - ), - Base64: []byte("SGVsbG8gd29ybGQh"), - List: []string{ - "list", - "list", - }, - Set: []string{ - "set", - }, - Map: map[int]string{ - 1: "map", }, - Bigint: acme.String( - "1000000", - ), }, }, ) @@ -2576,11 +2718,9 @@ func do() { "", ), ) - client.NoAuth.PostWithNoAuth( + client.Endpoints.Params.GetWithPath( context.TODO(), - map[string]interface{}{ - "key": "value", - }, + "param", ) } @@ -2591,6 +2731,7 @@ package example import ( context "context" client "github.com/acme/acme-go/client" + endpoints "github.com/acme/acme-go/endpoints" option "github.com/acme/acme-go/option" ) @@ -2600,8 +2741,12 @@ func do() { "", ), ) - client.NoReqBody.GetWithNoRequestBody( + client.Endpoints.Params.GetWithQuery( context.TODO(), + &endpoints.GetWithQuery{ + Query: "query", + Number: 1, + }, ) } @@ -2612,6 +2757,7 @@ package example import ( context "context" client "github.com/acme/acme-go/client" + endpoints "github.com/acme/acme-go/endpoints" option "github.com/acme/acme-go/option" ) @@ -2621,8 +2767,16 @@ func do() { "", ), ) - client.NoReqBody.PostWithNoRequestBody( + client.Endpoints.Params.GetWithAllowMultipleQuery( context.TODO(), + &endpoints.GetWithMultipleQuery{ + Query: []string{ + "query", + }, + Numer: []int{ + 1, + }, + }, ) } @@ -2632,8 +2786,8 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" + endpoints "github.com/acme/acme-go/endpoints" option "github.com/acme/acme-go/option" ) @@ -2643,76 +2797,35 @@ func do() { "", ), ) - client.ReqWithHeaders.GetWithCustomHeader( + client.Endpoints.Params.GetWithPathAndQuery( context.TODO(), - &acme.ReqWithHeaders{ - XTestServiceHeader: "X-TEST-SERVICE-HEADER", - XTestEndpointHeader: "X-TEST-ENDPOINT-HEADER", - Body: "string", + "param", + &endpoints.GetWithPathAndQuery{ + Query: "query", }, ) } -" -`; - -exports[`test definitions > extends 1`] = ` -"package example -import ( - context "context" - acme "github.com/acme/acme-go" - client "github.com/acme/acme-go/client" -) - -func do() { - client := client.NewClient() - client.ExtendedInlineRequestBody( - context.TODO(), - &acme.Inlined{ - Unique: "unique", - }, - ) -} -" -`; +------------------------ -exports[`test definitions > extra-properties 1`] = ` -"package example +package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient() - client.User.CreateUser( - context.TODO(), - &acme.CreateUserRequest{ - Name: "name", - }, + client := client.NewClient( + option.WithToken( + "", + ), ) -} -" -`; - -exports[`test definitions > file-download 1`] = `""`; - -exports[`test definitions > file-upload 1`] = `""`; - -exports[`test definitions > folders 1`] = ` -"package example - -import ( - context "context" - client "github.com/acme/acme-go/client" -) - -func do() { - client := client.NewClient() - client.Foo( + client.Endpoints.Params.ModifyWithPath( context.TODO(), + "param", + "string", ) } @@ -2723,12 +2836,18 @@ package example import ( context "context" client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient() - client.Foo( + client := client.NewClient( + option.WithToken( + "", + ), + ) + client.Endpoints.Primitive.GetAndReturnString( context.TODO(), + "string", ) } @@ -2739,12 +2858,18 @@ package example import ( context "context" client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient() - client.Foo( + client := client.NewClient( + option.WithToken( + "", + ), + ) + client.Endpoints.Primitive.GetAndReturnInt( context.TODO(), + 1, ) } @@ -2755,12 +2880,18 @@ package example import ( context "context" client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient() - client.Foo( + client := client.NewClient( + option.WithToken( + "", + ), + ) + client.Endpoints.Primitive.GetAndReturnLong( context.TODO(), + 1000000, ) } @@ -2771,12 +2902,18 @@ package example import ( context "context" client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient() - client.Folder.Service.Endpoint( + client := client.NewClient( + option.WithToken( + "", + ), + ) + client.Endpoints.Primitive.GetAndReturnDouble( context.TODO(), + 1.1, ) } @@ -2787,27 +2924,6 @@ package example import ( context "context" client "github.com/acme/acme-go/client" -) - -func do() { - client := client.NewClient() - client.Folder.Service.UnknownRequest( - context.TODO(), - map[string]interface{}{ - "key": "value", - }, - ) -} -" -`; - -exports[`test definitions > go-content-type 1`] = ` -"package example - -import ( - context "context" - acme "github.com/acme/acme-go" - client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" ) @@ -2817,31 +2933,9 @@ func do() { "", ), ) - client.Imdb.CreateMovie( - context.TODO(), - &acme.CreateMovieRequest{ - Title: "title", - Rating: 1.1, - }, - ) -} -" -`; - -exports[`test definitions > grpc-proto 1`] = ` -"package example - -import ( - context "context" - acme "github.com/acme/acme-go" - client "github.com/acme/acme-go/client" -) - -func do() { - client := client.NewClient() - client.Userservice.Create( + client.Endpoints.Primitive.GetAndReturnBool( context.TODO(), - &acme.CreateRequest{}, + true, ) } @@ -2853,55 +2947,70 @@ import ( context "context" acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient() - client.Userservice.Create( + client := client.NewClient( + option.WithToken( + "", + ), + ) + client.Endpoints.Primitive.GetAndReturnDatetime( context.TODO(), - &acme.CreateRequest{ - Username: acme.String( - "username", - ), - Email: acme.String( - "email", - ), - Age: acme.Int( - 1, - ), - Weight: acme.Float64( - 1.1, - ), - Metadata: &acme.Metadata{ - StringMetadataValueMap: map[string]*acme.MetadataValue{ - "metadata": &acme.MetadataValue{ - Double: 1.1, - }, - }, - }, - }, + acme.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + ) +} + +------------------------ + +package example + +import ( + context "context" + acme "github.com/acme/acme-go" + client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" +) + +func do() { + client := client.NewClient( + option.WithToken( + "", + ), + ) + client.Endpoints.Primitive.GetAndReturnDate( + context.TODO(), + acme.MustParseDateTime( + "2023-01-15", + ), ) } -" -`; -exports[`test definitions > grpc-proto-exhaustive 1`] = ` -"package example +------------------------ + +package example import ( context "context" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + uuid "github.com/google/uuid" ) func do() { client := client.NewClient( - option.WithAPIKey( - "", + option.WithToken( + "", ), ) - client.Dataservice.Foo( + client.Endpoints.Primitive.GetAndReturnUUID( context.TODO(), + uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), ) } @@ -2917,12 +3026,13 @@ import ( func do() { client := client.NewClient( - option.WithAPIKey( - "", + option.WithToken( + "", ), ) - client.Dataservice.Foo( + client.Endpoints.Primitive.GetAndReturnBase64( context.TODO(), + []byte("SGVsbG8gd29ybGQh"), ) } @@ -2932,27 +3042,23 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" ) func do() { client := client.NewClient( - option.WithAPIKey( - "", + option.WithToken( + "", ), ) - client.Dataservice.Upload( + client.Endpoints.Union.GetAndReturnUnion( context.TODO(), - &acme.UploadRequest{ - Columns: []*acme.Column{ - &acme.Column{ - ID: "id", - Values: []float64{ - 1.1, - }, - }, + &types.Animal{ + Dog: &types.Dog{ + Name: "name", + LikesToWoof: true, }, }, ) @@ -2967,70 +3073,67 @@ import ( acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" + types "github.com/acme/acme-go/types" + uuid "github.com/google/uuid" ) func do() { client := client.NewClient( - option.WithAPIKey( - "", + option.WithToken( + "", ), ) - client.Dataservice.Upload( + client.InlinedRequests.PostWithObjectBodyandResponse( context.TODO(), - &acme.UploadRequest{ - Columns: []*acme.Column{ - &acme.Column{ - ID: "id", - Values: []float64{ - 1.1, - 1.1, - }, - Metadata: &acme.Metadata{ - StringMetadataValueMap: map[string]*acme.MetadataValue{ - "metadata": &acme.MetadataValue{ - Double: 1.1, - }, - }, - }, - IndexedData: &acme.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, + &acme.PostWithObjectBody{ + String: "string", + Integer: 1, + NestedObject: &types.ObjectWithOptionalField{ + String: acme.String( + "string", + ), + Integer: acme.Int( + 1, + ), + Long: acme.Int64( + 1000000, + ), + Double: acme.Float64( + 1.1, + ), + Bool: acme.Bool( + true, + ), + Datetime: acme.Time( + acme.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + ), + Date: acme.Time( + acme.MustParseDateTime( + "2023-01-15", + ), + ), + UUID: acme.UUID( + uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + ), + Base64: []byte("SGVsbG8gd29ybGQh"), + List: []string{ + "list", + "list", }, - &acme.Column{ - ID: "id", - Values: []float64{ - 1.1, - 1.1, - }, - Metadata: &acme.Metadata{ - StringMetadataValueMap: map[string]*acme.MetadataValue{ - "metadata": &acme.MetadataValue{ - Double: 1.1, - }, - }, - }, - IndexedData: &acme.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, + Set: []string{ + "set", + }, + Map: map[int]string{ + 1: "map", }, + Bigint: acme.String( + "1000000", + ), }, - Namespace: acme.String( - "namespace", - ), }, ) } @@ -3041,20 +3144,21 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" ) func do() { client := client.NewClient( - option.WithAPIKey( - "", + option.WithToken( + "", ), ) - client.Dataservice.Delete( + client.NoAuth.PostWithNoAuth( context.TODO(), - &acme.DeleteRequest{}, + map[string]interface{}{ + "key": "value", + }, ) } @@ -3064,38 +3168,18 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" ) func do() { client := client.NewClient( - option.WithAPIKey( - "", + option.WithToken( + "", ), ) - client.Dataservice.Delete( + client.NoReqBody.GetWithNoRequestBody( context.TODO(), - &acme.DeleteRequest{ - IDs: []string{ - "ids", - "ids", - }, - DeleteAll: acme.Bool( - true, - ), - Namespace: acme.String( - "namespace", - ), - Filter: &acme.Metadata{ - StringMetadataValueMap: map[string]*acme.MetadataValue{ - "filter": &acme.MetadataValue{ - Double: 1.1, - }, - }, - }, - }, ) } @@ -3105,20 +3189,18 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" option "github.com/acme/acme-go/option" ) func do() { client := client.NewClient( - option.WithAPIKey( - "", + option.WithToken( + "", ), ) - client.Dataservice.Describe( + client.NoReqBody.PostWithNoRequestBody( context.TODO(), - &acme.DescribeRequest{}, ) } @@ -3135,76 +3217,80 @@ import ( func do() { client := client.NewClient( - option.WithAPIKey( - "", + option.WithToken( + "", ), ) - client.Dataservice.Describe( + client.ReqWithHeaders.GetWithCustomHeader( context.TODO(), - &acme.DescribeRequest{ - Filter: &acme.Metadata{ - StringMetadataValueMap: map[string]*acme.MetadataValue{ - "filter": &acme.MetadataValue{ - Double: 1.1, - }, - }, - }, + &acme.ReqWithHeaders{ + XTestServiceHeader: "X-TEST-SERVICE-HEADER", + XTestEndpointHeader: "X-TEST-ENDPOINT-HEADER", + Body: "string", }, ) } +" +`; ------------------------- +exports[`test definitions > extends 1`] = ` +"package example + +import ( + context "context" + acme "github.com/acme/acme-go" + client "github.com/acme/acme-go/client" +) + +func do() { + client := client.NewClient() + client.ExtendedInlineRequestBody( + context.TODO(), + &acme.Inlined{ + Unique: "unique", + }, + ) +} +" +`; -package example +exports[`test definitions > extra-properties 1`] = ` +"package example import ( context "context" acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithAPIKey( - "", - ), - ) - client.Dataservice.Fetch( + client := client.NewClient() + client.User.CreateUser( context.TODO(), - &acme.FetchRequest{}, + &acme.CreateUserRequest{ + Name: "name", + }, ) } +" +`; ------------------------- +exports[`test definitions > file-download 1`] = `""`; -package example +exports[`test definitions > file-upload 1`] = `""`; + +exports[`test definitions > folders 1`] = ` +"package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithAPIKey( - "", - ), - ) - client.Dataservice.Fetch( + client := client.NewClient() + client.Foo( context.TODO(), - &acme.FetchRequest{ - IDs: []*string{ - acme.String( - "ids", - ), - }, - Namespace: acme.String( - "namespace", - ), - }, ) } @@ -3214,20 +3300,13 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithAPIKey( - "", - ), - ) - client.Dataservice.List( + client := client.NewClient() + client.Foo( context.TODO(), - &acme.ListRequest{}, ) } @@ -3237,33 +3316,13 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithAPIKey( - "", - ), - ) - client.Dataservice.List( + client := client.NewClient() + client.Foo( context.TODO(), - &acme.ListRequest{ - Prefix: acme.String( - "prefix", - ), - Limit: acme.Int( - 1, - ), - PaginationToken: acme.String( - "paginationToken", - ), - Namespace: acme.String( - "namespace", - ), - }, ) } @@ -3273,22 +3332,13 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithAPIKey( - "", - ), - ) - client.Dataservice.Query( + client := client.NewClient() + client.Foo( context.TODO(), - &acme.QueryRequest{ - TopK: 1, - }, ) } @@ -3298,115 +3348,13 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithAPIKey( - "", - ), - ) - client.Dataservice.Query( + client := client.NewClient() + client.Folder.Service.Endpoint( context.TODO(), - &acme.QueryRequest{ - Namespace: acme.String( - "namespace", - ), - TopK: 1, - Filter: &acme.Metadata{ - StringMetadataValueMap: map[string]*acme.MetadataValue{ - "filter": &acme.MetadataValue{ - Double: 1.1, - }, - }, - }, - IncludeValues: acme.Bool( - true, - ), - IncludeMetadata: acme.Bool( - true, - ), - Queries: []*acme.QueryColumn{ - &acme.QueryColumn{ - Values: []float64{ - 1.1, - 1.1, - }, - TopK: acme.Int( - 1, - ), - Namespace: acme.String( - "namespace", - ), - Filter: &acme.Metadata{ - StringMetadataValueMap: map[string]*acme.MetadataValue{ - "filter": &acme.MetadataValue{ - Double: 1.1, - }, - }, - }, - IndexedData: &acme.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, - }, - &acme.QueryColumn{ - Values: []float64{ - 1.1, - 1.1, - }, - TopK: acme.Int( - 1, - ), - Namespace: acme.String( - "namespace", - ), - Filter: &acme.Metadata{ - StringMetadataValueMap: map[string]*acme.MetadataValue{ - "filter": &acme.MetadataValue{ - Double: 1.1, - }, - }, - }, - IndexedData: &acme.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, - }, - }, - Column: []float64{ - 1.1, - 1.1, - }, - ID: acme.String( - "id", - ), - IndexedData: &acme.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, - }, ) } @@ -3416,28 +3364,23 @@ package example import ( context "context" - acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" - option "github.com/acme/acme-go/option" ) func do() { - client := client.NewClient( - option.WithAPIKey( - "", - ), - ) - client.Dataservice.Update( + client := client.NewClient() + client.Folder.Service.UnknownRequest( context.TODO(), - &acme.UpdateRequest{ - ID: "id", + map[string]interface{}{ + "key": "value", }, ) } +" +`; ------------------------- - -package example +exports[`test definitions > go-content-type 1`] = ` +"package example import ( context "context" @@ -3448,38 +3391,15 @@ import ( func do() { client := client.NewClient( - option.WithAPIKey( - "", + option.WithToken( + "", ), ) - client.Dataservice.Update( + client.Imdb.CreateMovie( context.TODO(), - &acme.UpdateRequest{ - ID: "id", - Values: []float64{ - 1.1, - 1.1, - }, - SetMetadata: &acme.Metadata{ - StringMetadataValueMap: map[string]*acme.MetadataValue{ - "setMetadata": &acme.MetadataValue{ - Double: 1.1, - }, - }, - }, - Namespace: acme.String( - "namespace", - ), - IndexedData: &acme.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, + &acme.CreateMovieRequest{ + Title: "title", + Rating: 1.1, }, ) } diff --git a/generators/python/src/fern_python/generators/pydantic_model/custom_config.py b/generators/python/src/fern_python/generators/pydantic_model/custom_config.py index 136cabbc5e5..198949f2311 100644 --- a/generators/python/src/fern_python/generators/pydantic_model/custom_config.py +++ b/generators/python/src/fern_python/generators/pydantic_model/custom_config.py @@ -52,9 +52,9 @@ def check_wrapped_aliases_v1_only(self) -> Self: version_compat = self.version use_wrapped_aliases = self.wrapped_aliases - if use_wrapped_aliases and version_compat != PydanticVersionCompatibility.V1: + if use_wrapped_aliases and version_compat == PydanticVersionCompatibility.Both: raise ValueError( - "Wrapped aliases are only supported in Pydantic V1, please update your `version` field to be 'v1' to continue using wrapped aliases." + "Wrapped aliases are not supported for `both`, please update your `version` field to be 'v1' or `v2` to continue using wrapped aliases." ) if self.enum_type != "literals": diff --git a/generators/python/src/fern_python/generators/pydantic_model/fern_aware_pydantic_model.py b/generators/python/src/fern_python/generators/pydantic_model/fern_aware_pydantic_model.py index 39fcfd94a9a..dccb44c7f15 100644 --- a/generators/python/src/fern_python/generators/pydantic_model/fern_aware_pydantic_model.py +++ b/generators/python/src/fern_python/generators/pydantic_model/fern_aware_pydantic_model.py @@ -6,7 +6,6 @@ import fern.ir.resources as ir_types from fern_python.codegen import AST, LocalClassReference, SourceFile -from fern_python.external_dependencies.pydantic import PydanticVersionCompatibility from fern_python.pydantic_codegen import PydanticField, PydanticModel from ..context import PydanticGeneratorContext @@ -371,4 +370,4 @@ def __exit__( excinst: Optional[BaseException], exctb: Optional[TracebackType], ) -> None: - self.finish() + self.finish() \ No newline at end of file diff --git a/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/discriminated_union/discriminated_union_with_utils_generator.py b/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/discriminated_union/discriminated_union_with_utils_generator.py index a45f3c6ab9d..d5aa5521ae7 100644 --- a/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/discriminated_union/discriminated_union_with_utils_generator.py +++ b/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/discriminated_union/discriminated_union_with_utils_generator.py @@ -498,4 +498,4 @@ def assert_never(arg: Never) -> Never: def get_field_name_for_single_property(property: ir_types.SingleUnionTypeProperty) -> str: - return property.name.name.snake_case.safe_name + return property.name.name.snake_case.safe_name \ No newline at end of file diff --git a/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/pydantic_models/pydantic_model_alias_generator.py b/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/pydantic_models/pydantic_model_alias_generator.py index 821a3ebdf1d..a7b09bd8fe4 100644 --- a/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/pydantic_models/pydantic_model_alias_generator.py +++ b/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/pydantic_models/pydantic_model_alias_generator.py @@ -60,18 +60,19 @@ def generate( docstring=self._docs, snippet=self._snippet, ) as pydantic_model: + root_name = "__root__" if self._custom_config.version == "v1" else "root" pydantic_model.set_root_type(self._alias.alias_of) pydantic_model.add_method( name=self._get_getter_name(self._alias.alias_of), parameters=[], return_type=self._alias.alias_of, - body=AST.CodeWriter("return self.__root__"), + body=AST.CodeWriter(f"return self.{root_name}"), ) pydantic_model.add_method( name=self._get_builder_name(self._alias.alias_of), parameters=[(BUILDER_PARAMETER_NAME, self._alias.alias_of)], return_type=ir_types.TypeReference.factory.named(declared_type_name_to_named_type(self._name)), - body=AST.CodeWriter(f"return {pydantic_model.get_class_name()}(__root__={BUILDER_PARAMETER_NAME})"), + body=AST.CodeWriter(f"return {pydantic_model.get_class_name()}({root_name}={BUILDER_PARAMETER_NAME})"), decorator=AST.ClassMethodDecorator.STATIC, ) @@ -145,4 +146,4 @@ def __init__( as_request=False, ) - # generate_snippet delegates to the parent class AliasSnippetGenerator + # generate_snippet delegates to the parent class AliasSnippetGenerator \ No newline at end of file diff --git a/generators/python/src/fern_python/generators/pydantic_model/validators/__init__.py b/generators/python/src/fern_python/generators/pydantic_model/validators/__init__.py index e3609e95fbd..ce1298b2246 100644 --- a/generators/python/src/fern_python/generators/pydantic_model/validators/__init__.py +++ b/generators/python/src/fern_python/generators/pydantic_model/validators/__init__.py @@ -4,4 +4,4 @@ from .pydantic_validators_generator import PydanticValidatorsGenerator from .validators_generator import ValidatorsGenerator -__all__ = ["ValidatorsGenerator", "PydanticValidatorsGenerator", "PydanticV1CustomRootTypeValidatorsGenerator"] +__all__ = ["ValidatorsGenerator", "PydanticValidatorsGenerator", "PydanticV1CustomRootTypeValidatorsGenerator"] \ No newline at end of file diff --git a/generators/python/src/fern_python/generators/pydantic_model/validators/validator_generators/pydantic_custom_root_type_validator_generator.py b/generators/python/src/fern_python/generators/pydantic_model/validators/validator_generators/pydantic_custom_root_type_validator_generator.py index ebe8b0888d2..c72462989aa 100644 --- a/generators/python/src/fern_python/generators/pydantic_model/validators/validator_generators/pydantic_custom_root_type_validator_generator.py +++ b/generators/python/src/fern_python/generators/pydantic_model/validators/validator_generators/pydantic_custom_root_type_validator_generator.py @@ -114,3 +114,4 @@ def write_example_for_docstring(self, writer: AST.NodeWriter) -> None: def _get_root_property_name(self) -> str: return "__root__" if self._model._version == PydanticVersionCompatibility.V1 else "root" + diff --git a/generators/python/src/fern_python/pydantic_codegen/pydantic_model.py b/generators/python/src/fern_python/pydantic_codegen/pydantic_model.py index 219d47a5b0b..adf0eb1ac6e 100644 --- a/generators/python/src/fern_python/pydantic_codegen/pydantic_model.py +++ b/generators/python/src/fern_python/pydantic_codegen/pydantic_model.py @@ -109,11 +109,7 @@ def add_field(self, unsanitized_field: PydanticField) -> None: self._has_aliases |= is_aliased default_value = ( - ( - AST.Expression("None") - if unsanitized_field.type_hint.is_optional and self._require_optional_fields is False - else None - ) + (AST.Expression("None") if unsanitized_field.type_hint.is_optional and self._require_optional_fields is False else None) if field.default_value is None else field.default_value ) @@ -141,22 +137,16 @@ def add_field(self, unsanitized_field: PydanticField) -> None: type_hint=aliased_type_hint, ) - self._class_declaration.add_class_var( - AST.VariableDeclaration(name=field.name, type_hint=field.type_hint, initializer=initializer) - ) + self._class_declaration.add_class_var(AST.VariableDeclaration(name=field.name, type_hint=field.type_hint, initializer=initializer)) self._fields.append(field) def get_public_fields(self) -> List[PydanticField]: return self._fields - def add_private_instance_field( - self, name: str, type_hint: AST.TypeHint, default_factory: Optional[AST.Expression] = None - ) -> None: + def add_private_instance_field(self, name: str, type_hint: AST.TypeHint, default_factory: Optional[AST.Expression] = None) -> None: if not name.startswith("_"): - raise RuntimeError( - f"Private pydantic field {name} in {self._class_declaration.name} does not start with an underscore" - ) + raise RuntimeError(f"Private pydantic field {name} in {self._class_declaration.name} does not start with an underscore") self._class_declaration.add_class_var( AST.VariableDeclaration( name=name, @@ -240,9 +230,7 @@ def add_root_validator( declaration=AST.FunctionDeclaration( name=validator_name, signature=AST.FunctionSignature( - parameters=[ - AST.FunctionParameter(name=PydanticModel.VALIDATOR_VALUES_PARAMETER_NAME, type_hint=value_type) - ], + parameters=[AST.FunctionParameter(name=PydanticModel.VALIDATOR_VALUES_PARAMETER_NAME, type_hint=value_type)], return_type=value_type, ), body=body, @@ -250,15 +238,14 @@ def add_root_validator( ), ) - def set_root_type_unsafe( - self, root_type: AST.TypeHint, annotation: Optional[AST.Expression] = None - ) -> None: + def set_root_type_unsafe(self, root_type: AST.TypeHint, annotation: Optional[AST.Expression] = None) -> None: if self._version == PydanticVersionCompatibility.Both: raise RuntimeError("Overriding root types is only available in Pydantic v1 or v2") - + if self._root_type is not None: raise RuntimeError("__root__ was already added") - + + self.root_type = root_type root_type_with_annotation = ( @@ -270,16 +257,11 @@ def set_root_type_unsafe( else root_type ) - if self._version == PydanticVersionCompatibility.V1: - self._class_declaration.add_statement( - AST.VariableDeclaration(name="__root__", type_hint=root_type_with_annotation) - ) - - if self._version == PydanticVersionCompatibility.V2: - self._class_declaration.add_statement( - AST.VariableDeclaration(name="root", type_hint=root_type_with_annotation) - ) - + if self._version == PydanticVersionCompatibility.V1: + self._class_declaration.add_statement(AST.VariableDeclaration(name="__root__", type_hint=root_type_with_annotation)) + + if self._version == PydanticVersionCompatibility.V2: + self._class_declaration.add_statement(AST.VariableDeclaration(name="root", type_hint=root_type_with_annotation)) def get_root_type_unsafe(self) -> Optional[AST.TypeHint]: return self.root_type @@ -296,8 +278,7 @@ def add_partial_class(self) -> None: extends=[ dataclasses.replace( base_model, - qualified_name_excluding_import=base_model.qualified_name_excluding_import - + (PydanticModel._PARTIAL_CLASS_NAME,), + qualified_name_excluding_import=base_model.qualified_name_excluding_import + (PydanticModel._PARTIAL_CLASS_NAME,), ) for base_model in self._base_models ] @@ -380,10 +361,7 @@ def write_extras(writer: AST.NodeWriter) -> None: writer.write_node(v2_model_config) if ( - ( - self._version == PydanticVersionCompatibility.Both - and (v1_config_class is not None or v2_model_config is not None) - ) + (self._version == PydanticVersionCompatibility.Both and (v1_config_class is not None or v2_model_config is not None)) or (self._version == PydanticVersionCompatibility.V1 and v1_config_class is not None) or (self._version == PydanticVersionCompatibility.V2 and v2_model_config is not None) ): diff --git a/generators/python/tests/sdk/test_custom_config.py b/generators/python/tests/sdk/test_custom_config.py index 73b74866ad4..4c09d55d588 100644 --- a/generators/python/tests/sdk/test_custom_config.py +++ b/generators/python/tests/sdk/test_custom_config.py @@ -44,8 +44,8 @@ def test_parse_wrapped_aliases() -> None: "wrapped_aliases": True, }, } - with pytest.raises(pydantic.ValidationError, match="Wrapped aliases are only supported in Pydantic V1, please update your `version` field to be 'v1' to continue using wrapped aliases."): - SDKCustomConfig.parse_obj(v2) + sdk_custom_config = SDKCustomConfig.parse_obj(v2) + assert sdk_custom_config.pydantic_config.version == "v2" and sdk_custom_config.pydantic_config.wrapped_aliases is True both = { "pydantic_config": { @@ -53,5 +53,5 @@ def test_parse_wrapped_aliases() -> None: "wrapped_aliases": True, }, } - with pytest.raises(pydantic.ValidationError, match="Wrapped aliases are only supported in Pydantic V1, please update your `version` field to be 'v1' to continue using wrapped aliases."): + with pytest.raises(pydantic.ValidationError, match="Wrapped aliases are not supported for `both`, please update your `version` field to be 'v1' or `v2` to continue using wrapped aliases."): SDKCustomConfig.parse_obj(both) diff --git a/packages/cli/dynamic-snippets/src/__test__/test-definitions/csharp-grpc-proto-exhaustive.json b/packages/cli/dynamic-snippets/src/__test__/test-definitions/csharp-grpc-proto-exhaustive.json new file mode 100644 index 00000000000..956dec3d7b3 --- /dev/null +++ b/packages/cli/dynamic-snippets/src/__test__/test-definitions/csharp-grpc-proto-exhaustive.json @@ -0,0 +1,3760 @@ +{ + "version": "1.0.0", + "types": { + "type_:Column": { + "type": "object", + "declaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "typeReference": { + "_type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "typeReference": { + "_type": "list", + "value": { + "_type": "primitive", + "value": "FLOAT" + } + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Metadata" + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:IndexedData" + } + } + } + ] + }, + "type_:DeleteResponse": { + "type": "object", + "declaration": { + "name": { + "originalName": "DeleteResponse", + "camelCase": { + "unsafeName": "deleteResponse", + "safeName": "deleteResponse" + }, + "snakeCase": { + "unsafeName": "delete_response", + "safeName": "delete_response" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_RESPONSE", + "safeName": "DELETE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DeleteResponse", + "safeName": "DeleteResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [] + }, + "type_:DescribeResponse": { + "type": "object", + "declaration": { + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "namespaces", + "camelCase": { + "unsafeName": "namespaces", + "safeName": "namespaces" + }, + "snakeCase": { + "unsafeName": "namespaces", + "safeName": "namespaces" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACES", + "safeName": "NAMESPACES" + }, + "pascalCase": { + "unsafeName": "Namespaces", + "safeName": "Namespaces" + } + }, + "wireValue": "namespaces" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "map", + "key": { + "_type": "primitive", + "value": "STRING" + }, + "value": { + "_type": "named", + "value": "type_:NamespaceSummary" + } + } + } + }, + { + "name": { + "name": { + "originalName": "dimension", + "camelCase": { + "unsafeName": "dimension", + "safeName": "dimension" + }, + "snakeCase": { + "unsafeName": "dimension", + "safeName": "dimension" + }, + "screamingSnakeCase": { + "unsafeName": "DIMENSION", + "safeName": "DIMENSION" + }, + "pascalCase": { + "unsafeName": "Dimension", + "safeName": "Dimension" + } + }, + "wireValue": "dimension" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "UINT" + } + } + }, + { + "name": { + "name": { + "originalName": "fullness", + "camelCase": { + "unsafeName": "fullness", + "safeName": "fullness" + }, + "snakeCase": { + "unsafeName": "fullness", + "safeName": "fullness" + }, + "screamingSnakeCase": { + "unsafeName": "FULLNESS", + "safeName": "FULLNESS" + }, + "pascalCase": { + "unsafeName": "Fullness", + "safeName": "Fullness" + } + }, + "wireValue": "fullness" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "FLOAT" + } + } + }, + { + "name": { + "name": { + "originalName": "totalCount", + "camelCase": { + "unsafeName": "totalCount", + "safeName": "totalCount" + }, + "snakeCase": { + "unsafeName": "total_count", + "safeName": "total_count" + }, + "screamingSnakeCase": { + "unsafeName": "TOTAL_COUNT", + "safeName": "TOTAL_COUNT" + }, + "pascalCase": { + "unsafeName": "TotalCount", + "safeName": "TotalCount" + } + }, + "wireValue": "totalCount" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "UINT" + } + } + } + ] + }, + "type_:FetchResponse": { + "type": "object", + "declaration": { + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "map", + "key": { + "_type": "primitive", + "value": "STRING" + }, + "value": { + "_type": "named", + "value": "type_:Column" + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Usage" + } + } + } + ] + }, + "type_:IndexedData": { + "type": "object", + "declaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "typeReference": { + "_type": "list", + "value": { + "_type": "primitive", + "value": "UINT" + } + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "typeReference": { + "_type": "list", + "value": { + "_type": "primitive", + "value": "FLOAT" + } + } + } + ] + }, + "type_:ListElement": { + "type": "object", + "declaration": { + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + } + ] + }, + "type_:ListResponse": { + "type": "object", + "declaration": { + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "list", + "value": { + "_type": "named", + "value": "type_:ListElement" + } + } + } + }, + { + "name": { + "name": { + "originalName": "pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "wireValue": "pagination" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Pagination" + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Usage" + } + } + } + ] + }, + "type_:NamespaceSummary": { + "type": "object", + "declaration": { + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "count", + "camelCase": { + "unsafeName": "count", + "safeName": "count" + }, + "snakeCase": { + "unsafeName": "count", + "safeName": "count" + }, + "screamingSnakeCase": { + "unsafeName": "COUNT", + "safeName": "COUNT" + }, + "pascalCase": { + "unsafeName": "Count", + "safeName": "Count" + } + }, + "wireValue": "count" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "UINT" + } + } + } + ] + }, + "type_:Pagination": { + "type": "object", + "declaration": { + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "next", + "camelCase": { + "unsafeName": "next", + "safeName": "next" + }, + "snakeCase": { + "unsafeName": "next", + "safeName": "next" + }, + "screamingSnakeCase": { + "unsafeName": "NEXT", + "safeName": "NEXT" + }, + "pascalCase": { + "unsafeName": "Next", + "safeName": "Next" + } + }, + "wireValue": "next" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + } + ] + }, + "type_:QueryColumn": { + "type": "object", + "declaration": { + "name": { + "originalName": "QueryColumn", + "camelCase": { + "unsafeName": "queryColumn", + "safeName": "queryColumn" + }, + "snakeCase": { + "unsafeName": "query_column", + "safeName": "query_column" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_COLUMN", + "safeName": "QUERY_COLUMN" + }, + "pascalCase": { + "unsafeName": "QueryColumn", + "safeName": "QueryColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "typeReference": { + "_type": "list", + "value": { + "_type": "primitive", + "value": "FLOAT" + } + } + }, + { + "name": { + "name": { + "originalName": "topK", + "camelCase": { + "unsafeName": "topK", + "safeName": "topK" + }, + "snakeCase": { + "unsafeName": "top_k", + "safeName": "top_k" + }, + "screamingSnakeCase": { + "unsafeName": "TOP_K", + "safeName": "TOP_K" + }, + "pascalCase": { + "unsafeName": "TopK", + "safeName": "TopK" + } + }, + "wireValue": "topK" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "UINT" + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Metadata" + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:IndexedData" + } + } + } + ] + }, + "type_:QueryResponse": { + "type": "object", + "declaration": { + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "results", + "camelCase": { + "unsafeName": "results", + "safeName": "results" + }, + "snakeCase": { + "unsafeName": "results", + "safeName": "results" + }, + "screamingSnakeCase": { + "unsafeName": "RESULTS", + "safeName": "RESULTS" + }, + "pascalCase": { + "unsafeName": "Results", + "safeName": "Results" + } + }, + "wireValue": "results" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "list", + "value": { + "_type": "named", + "value": "type_:QueryResult" + } + } + } + }, + { + "name": { + "name": { + "originalName": "matches", + "camelCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "snakeCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "screamingSnakeCase": { + "unsafeName": "MATCHES", + "safeName": "MATCHES" + }, + "pascalCase": { + "unsafeName": "Matches", + "safeName": "Matches" + } + }, + "wireValue": "matches" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "list", + "value": { + "_type": "named", + "value": "type_:ScoredColumn" + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Usage" + } + } + } + ] + }, + "type_:QueryResult": { + "type": "object", + "declaration": { + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "matches", + "camelCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "snakeCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "screamingSnakeCase": { + "unsafeName": "MATCHES", + "safeName": "MATCHES" + }, + "pascalCase": { + "unsafeName": "Matches", + "safeName": "Matches" + } + }, + "wireValue": "matches" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "list", + "value": { + "_type": "named", + "value": "type_:ScoredColumn" + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + } + ] + }, + "type_:ScoredColumn": { + "type": "object", + "declaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "typeReference": { + "_type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "score", + "camelCase": { + "unsafeName": "score", + "safeName": "score" + }, + "snakeCase": { + "unsafeName": "score", + "safeName": "score" + }, + "screamingSnakeCase": { + "unsafeName": "SCORE", + "safeName": "SCORE" + }, + "pascalCase": { + "unsafeName": "Score", + "safeName": "Score" + } + }, + "wireValue": "score" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "FLOAT" + } + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "list", + "value": { + "_type": "primitive", + "value": "FLOAT" + } + } + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Metadata" + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:IndexedData" + } + } + } + ] + }, + "type_:UpdateResponse": { + "type": "object", + "declaration": { + "name": { + "originalName": "UpdateResponse", + "camelCase": { + "unsafeName": "updateResponse", + "safeName": "updateResponse" + }, + "snakeCase": { + "unsafeName": "update_response", + "safeName": "update_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE_RESPONSE", + "safeName": "UPDATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UpdateResponse", + "safeName": "UpdateResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [] + }, + "type_:UploadResponse": { + "type": "object", + "declaration": { + "name": { + "originalName": "UploadResponse", + "camelCase": { + "unsafeName": "uploadResponse", + "safeName": "uploadResponse" + }, + "snakeCase": { + "unsafeName": "upload_response", + "safeName": "upload_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_RESPONSE", + "safeName": "UPLOAD_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UploadResponse", + "safeName": "UploadResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "count", + "camelCase": { + "unsafeName": "count", + "safeName": "count" + }, + "snakeCase": { + "unsafeName": "count", + "safeName": "count" + }, + "screamingSnakeCase": { + "unsafeName": "COUNT", + "safeName": "COUNT" + }, + "pascalCase": { + "unsafeName": "Count", + "safeName": "Count" + } + }, + "wireValue": "count" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "UINT" + } + } + } + ] + }, + "type_:Usage": { + "type": "object", + "declaration": { + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "units", + "camelCase": { + "unsafeName": "units", + "safeName": "units" + }, + "snakeCase": { + "unsafeName": "units", + "safeName": "units" + }, + "screamingSnakeCase": { + "unsafeName": "UNITS", + "safeName": "UNITS" + }, + "pascalCase": { + "unsafeName": "Units", + "safeName": "Units" + } + }, + "wireValue": "units" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "UINT" + } + } + } + ] + }, + "type_:Metadata": { + "type": "undiscriminatedUnion", + "declaration": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "types": [ + { + "_type": "map", + "key": { + "_type": "primitive", + "value": "STRING" + }, + "value": { + "_type": "named", + "value": "type_:MetadataValue" + } + }, + { + "_type": "map", + "key": { + "_type": "primitive", + "value": "STRING" + }, + "value": { + "_type": "unknown" + } + } + ] + }, + "type_:MetadataValue": { + "type": "undiscriminatedUnion", + "declaration": { + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "types": [ + { + "_type": "primitive", + "value": "DOUBLE" + }, + { + "_type": "primitive", + "value": "STRING" + }, + { + "_type": "primitive", + "value": "BOOLEAN" + } + ] + } + }, + "headers": [], + "endpoints": { + "endpoint_dataservice.foo": { + "auth": null, + "declaration": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "location": { + "method": "POST", + "path": "/foo" + }, + "request": { + "type": "body", + "pathParameters": [], + "body": null + }, + "response": { + "type": "json" + } + }, + "endpoint_dataservice.upload": { + "auth": null, + "declaration": { + "name": { + "originalName": "upload", + "camelCase": { + "unsafeName": "upload", + "safeName": "upload" + }, + "snakeCase": { + "unsafeName": "upload", + "safeName": "upload" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD", + "safeName": "UPLOAD" + }, + "pascalCase": { + "unsafeName": "Upload", + "safeName": "Upload" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "location": { + "method": "POST", + "path": "/data" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "UploadRequest", + "camelCase": { + "unsafeName": "uploadRequest", + "safeName": "uploadRequest" + }, + "snakeCase": { + "unsafeName": "upload_request", + "safeName": "upload_request" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_REQUEST", + "safeName": "UPLOAD_REQUEST" + }, + "pascalCase": { + "unsafeName": "UploadRequest", + "safeName": "UploadRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "body": { + "type": "properties", + "value": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "typeReference": { + "_type": "list", + "value": { + "_type": "named", + "value": "type_:Column" + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + } + ] + } + }, + "response": { + "type": "json" + } + }, + "endpoint_dataservice.delete": { + "auth": null, + "declaration": { + "name": { + "originalName": "delete", + "camelCase": { + "unsafeName": "delete", + "safeName": "delete" + }, + "snakeCase": { + "unsafeName": "delete", + "safeName": "delete" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE", + "safeName": "DELETE" + }, + "pascalCase": { + "unsafeName": "Delete", + "safeName": "Delete" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "location": { + "method": "POST", + "path": "/data/delete" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "DeleteRequest", + "camelCase": { + "unsafeName": "deleteRequest", + "safeName": "deleteRequest" + }, + "snakeCase": { + "unsafeName": "delete_request", + "safeName": "delete_request" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_REQUEST", + "safeName": "DELETE_REQUEST" + }, + "pascalCase": { + "unsafeName": "DeleteRequest", + "safeName": "DeleteRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "body": { + "type": "properties", + "value": [ + { + "name": { + "name": { + "originalName": "ids", + "camelCase": { + "unsafeName": "ids", + "safeName": "ids" + }, + "snakeCase": { + "unsafeName": "ids", + "safeName": "ids" + }, + "screamingSnakeCase": { + "unsafeName": "IDS", + "safeName": "IDS" + }, + "pascalCase": { + "unsafeName": "IDs", + "safeName": "IDs" + } + }, + "wireValue": "ids" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "list", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + } + }, + { + "name": { + "name": { + "originalName": "deleteAll", + "camelCase": { + "unsafeName": "deleteAll", + "safeName": "deleteAll" + }, + "snakeCase": { + "unsafeName": "delete_all", + "safeName": "delete_all" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_ALL", + "safeName": "DELETE_ALL" + }, + "pascalCase": { + "unsafeName": "DeleteAll", + "safeName": "DeleteAll" + } + }, + "wireValue": "deleteAll" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "BOOLEAN" + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Metadata" + } + } + } + ] + } + }, + "response": { + "type": "json" + } + }, + "endpoint_dataservice.describe": { + "auth": null, + "declaration": { + "name": { + "originalName": "describe", + "camelCase": { + "unsafeName": "describe", + "safeName": "describe" + }, + "snakeCase": { + "unsafeName": "describe", + "safeName": "describe" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE", + "safeName": "DESCRIBE" + }, + "pascalCase": { + "unsafeName": "Describe", + "safeName": "Describe" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "location": { + "method": "POST", + "path": "/data/describe" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "DescribeRequest", + "camelCase": { + "unsafeName": "describeRequest", + "safeName": "describeRequest" + }, + "snakeCase": { + "unsafeName": "describe_request", + "safeName": "describe_request" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_REQUEST", + "safeName": "DESCRIBE_REQUEST" + }, + "pascalCase": { + "unsafeName": "DescribeRequest", + "safeName": "DescribeRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "body": { + "type": "properties", + "value": [ + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Metadata" + } + } + } + ] + } + }, + "response": { + "type": "json" + } + }, + "endpoint_dataservice.fetch": { + "auth": null, + "declaration": { + "name": { + "originalName": "fetch", + "camelCase": { + "unsafeName": "fetch", + "safeName": "fetch" + }, + "snakeCase": { + "unsafeName": "fetch", + "safeName": "fetch" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH", + "safeName": "FETCH" + }, + "pascalCase": { + "unsafeName": "Fetch", + "safeName": "Fetch" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "location": { + "method": "GET", + "path": "/data/fetch" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "FetchRequest", + "camelCase": { + "unsafeName": "fetchRequest", + "safeName": "fetchRequest" + }, + "snakeCase": { + "unsafeName": "fetch_request", + "safeName": "fetch_request" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_REQUEST", + "safeName": "FETCH_REQUEST" + }, + "pascalCase": { + "unsafeName": "FetchRequest", + "safeName": "FetchRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "pathParameters": [], + "queryParameters": [ + { + "name": { + "name": { + "originalName": "ids", + "camelCase": { + "unsafeName": "ids", + "safeName": "ids" + }, + "snakeCase": { + "unsafeName": "ids", + "safeName": "ids" + }, + "screamingSnakeCase": { + "unsafeName": "IDS", + "safeName": "IDS" + }, + "pascalCase": { + "unsafeName": "IDs", + "safeName": "IDs" + } + }, + "wireValue": "ids" + }, + "typeReference": { + "_type": "list", + "value": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + } + ], + "headers": [], + "body": null + }, + "response": { + "type": "json" + } + }, + "endpoint_dataservice.list": { + "auth": null, + "declaration": { + "name": { + "originalName": "list", + "camelCase": { + "unsafeName": "list", + "safeName": "list" + }, + "snakeCase": { + "unsafeName": "list", + "safeName": "list" + }, + "screamingSnakeCase": { + "unsafeName": "LIST", + "safeName": "LIST" + }, + "pascalCase": { + "unsafeName": "List", + "safeName": "List" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "location": { + "method": "GET", + "path": "/data/list" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "ListRequest", + "camelCase": { + "unsafeName": "listRequest", + "safeName": "listRequest" + }, + "snakeCase": { + "unsafeName": "list_request", + "safeName": "list_request" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_REQUEST", + "safeName": "LIST_REQUEST" + }, + "pascalCase": { + "unsafeName": "ListRequest", + "safeName": "ListRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "pathParameters": [], + "queryParameters": [ + { + "name": { + "name": { + "originalName": "prefix", + "camelCase": { + "unsafeName": "prefix", + "safeName": "prefix" + }, + "snakeCase": { + "unsafeName": "prefix", + "safeName": "prefix" + }, + "screamingSnakeCase": { + "unsafeName": "PREFIX", + "safeName": "PREFIX" + }, + "pascalCase": { + "unsafeName": "Prefix", + "safeName": "Prefix" + } + }, + "wireValue": "prefix" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "limit", + "camelCase": { + "unsafeName": "limit", + "safeName": "limit" + }, + "snakeCase": { + "unsafeName": "limit", + "safeName": "limit" + }, + "screamingSnakeCase": { + "unsafeName": "LIMIT", + "safeName": "LIMIT" + }, + "pascalCase": { + "unsafeName": "Limit", + "safeName": "Limit" + } + }, + "wireValue": "limit" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "UINT" + } + } + }, + { + "name": { + "name": { + "originalName": "paginationToken", + "camelCase": { + "unsafeName": "paginationToken", + "safeName": "paginationToken" + }, + "snakeCase": { + "unsafeName": "pagination_token", + "safeName": "pagination_token" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION_TOKEN", + "safeName": "PAGINATION_TOKEN" + }, + "pascalCase": { + "unsafeName": "PaginationToken", + "safeName": "PaginationToken" + } + }, + "wireValue": "paginationToken" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + } + ], + "headers": [], + "body": null + }, + "response": { + "type": "json" + } + }, + "endpoint_dataservice.query": { + "auth": null, + "declaration": { + "name": { + "originalName": "query", + "camelCase": { + "unsafeName": "query", + "safeName": "query" + }, + "snakeCase": { + "unsafeName": "query", + "safeName": "query" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY", + "safeName": "QUERY" + }, + "pascalCase": { + "unsafeName": "Query", + "safeName": "Query" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "location": { + "method": "POST", + "path": "/data/query" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "QueryRequest", + "camelCase": { + "unsafeName": "queryRequest", + "safeName": "queryRequest" + }, + "snakeCase": { + "unsafeName": "query_request", + "safeName": "query_request" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_REQUEST", + "safeName": "QUERY_REQUEST" + }, + "pascalCase": { + "unsafeName": "QueryRequest", + "safeName": "QueryRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "body": { + "type": "properties", + "value": [ + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "topK", + "camelCase": { + "unsafeName": "topK", + "safeName": "topK" + }, + "snakeCase": { + "unsafeName": "top_k", + "safeName": "top_k" + }, + "screamingSnakeCase": { + "unsafeName": "TOP_K", + "safeName": "TOP_K" + }, + "pascalCase": { + "unsafeName": "TopK", + "safeName": "TopK" + } + }, + "wireValue": "topK" + }, + "typeReference": { + "_type": "primitive", + "value": "UINT" + } + }, + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Metadata" + } + } + }, + { + "name": { + "name": { + "originalName": "includeValues", + "camelCase": { + "unsafeName": "includeValues", + "safeName": "includeValues" + }, + "snakeCase": { + "unsafeName": "include_values", + "safeName": "include_values" + }, + "screamingSnakeCase": { + "unsafeName": "INCLUDE_VALUES", + "safeName": "INCLUDE_VALUES" + }, + "pascalCase": { + "unsafeName": "IncludeValues", + "safeName": "IncludeValues" + } + }, + "wireValue": "includeValues" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "BOOLEAN" + } + } + }, + { + "name": { + "name": { + "originalName": "includeMetadata", + "camelCase": { + "unsafeName": "includeMetadata", + "safeName": "includeMetadata" + }, + "snakeCase": { + "unsafeName": "include_metadata", + "safeName": "include_metadata" + }, + "screamingSnakeCase": { + "unsafeName": "INCLUDE_METADATA", + "safeName": "INCLUDE_METADATA" + }, + "pascalCase": { + "unsafeName": "IncludeMetadata", + "safeName": "IncludeMetadata" + } + }, + "wireValue": "includeMetadata" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "BOOLEAN" + } + } + }, + { + "name": { + "name": { + "originalName": "queries", + "camelCase": { + "unsafeName": "queries", + "safeName": "queries" + }, + "snakeCase": { + "unsafeName": "queries", + "safeName": "queries" + }, + "screamingSnakeCase": { + "unsafeName": "QUERIES", + "safeName": "QUERIES" + }, + "pascalCase": { + "unsafeName": "Queries", + "safeName": "Queries" + } + }, + "wireValue": "queries" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "list", + "value": { + "_type": "named", + "value": "type_:QueryColumn" + } + } + } + }, + { + "name": { + "name": { + "originalName": "column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "wireValue": "column" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "list", + "value": { + "_type": "primitive", + "value": "FLOAT" + } + } + } + }, + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:IndexedData" + } + } + } + ] + } + }, + "response": { + "type": "json" + } + }, + "endpoint_dataservice.update": { + "auth": null, + "declaration": { + "name": { + "originalName": "update", + "camelCase": { + "unsafeName": "update", + "safeName": "update" + }, + "snakeCase": { + "unsafeName": "update", + "safeName": "update" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE", + "safeName": "UPDATE" + }, + "pascalCase": { + "unsafeName": "Update", + "safeName": "Update" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "location": { + "method": "POST", + "path": "/data/update" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "UpdateRequest", + "camelCase": { + "unsafeName": "updateRequest", + "safeName": "updateRequest" + }, + "snakeCase": { + "unsafeName": "update_request", + "safeName": "update_request" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE_REQUEST", + "safeName": "UPDATE_REQUEST" + }, + "pascalCase": { + "unsafeName": "UpdateRequest", + "safeName": "UpdateRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "body": { + "type": "properties", + "value": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "typeReference": { + "_type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "list", + "value": { + "_type": "primitive", + "value": "FLOAT" + } + } + } + }, + { + "name": { + "name": { + "originalName": "setMetadata", + "camelCase": { + "unsafeName": "setMetadata", + "safeName": "setMetadata" + }, + "snakeCase": { + "unsafeName": "set_metadata", + "safeName": "set_metadata" + }, + "screamingSnakeCase": { + "unsafeName": "SET_METADATA", + "safeName": "SET_METADATA" + }, + "pascalCase": { + "unsafeName": "SetMetadata", + "safeName": "SetMetadata" + } + }, + "wireValue": "setMetadata" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Metadata" + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:IndexedData" + } + } + } + ] + } + }, + "response": { + "type": "json" + } + } + } +} \ No newline at end of file diff --git a/packages/cli/dynamic-snippets/src/__test__/test-definitions/csharp-grpc-proto.json b/packages/cli/dynamic-snippets/src/__test__/test-definitions/csharp-grpc-proto.json new file mode 100644 index 00000000000..ddda8ee63d7 --- /dev/null +++ b/packages/cli/dynamic-snippets/src/__test__/test-definitions/csharp-grpc-proto.json @@ -0,0 +1,655 @@ +{ + "version": "1.0.0", + "types": { + "type_:CreateResponse": { + "type": "object", + "declaration": { + "name": { + "originalName": "CreateResponse", + "camelCase": { + "unsafeName": "createResponse", + "safeName": "createResponse" + }, + "snakeCase": { + "unsafeName": "create_response", + "safeName": "create_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_RESPONSE", + "safeName": "CREATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateResponse", + "safeName": "CreateResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "user", + "camelCase": { + "unsafeName": "user", + "safeName": "user" + }, + "snakeCase": { + "unsafeName": "user", + "safeName": "user" + }, + "screamingSnakeCase": { + "unsafeName": "USER", + "safeName": "USER" + }, + "pascalCase": { + "unsafeName": "User", + "safeName": "User" + } + }, + "wireValue": "user" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:UserModel" + } + } + } + ] + }, + "type_:UserModel": { + "type": "object", + "declaration": { + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "username", + "camelCase": { + "unsafeName": "username", + "safeName": "username" + }, + "snakeCase": { + "unsafeName": "username", + "safeName": "username" + }, + "screamingSnakeCase": { + "unsafeName": "USERNAME", + "safeName": "USERNAME" + }, + "pascalCase": { + "unsafeName": "Username", + "safeName": "Username" + } + }, + "wireValue": "username" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "email", + "camelCase": { + "unsafeName": "email", + "safeName": "email" + }, + "snakeCase": { + "unsafeName": "email", + "safeName": "email" + }, + "screamingSnakeCase": { + "unsafeName": "EMAIL", + "safeName": "EMAIL" + }, + "pascalCase": { + "unsafeName": "Email", + "safeName": "Email" + } + }, + "wireValue": "email" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "age", + "camelCase": { + "unsafeName": "age", + "safeName": "age" + }, + "snakeCase": { + "unsafeName": "age", + "safeName": "age" + }, + "screamingSnakeCase": { + "unsafeName": "AGE", + "safeName": "AGE" + }, + "pascalCase": { + "unsafeName": "Age", + "safeName": "Age" + } + }, + "wireValue": "age" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "UINT" + } + } + }, + { + "name": { + "name": { + "originalName": "weight", + "camelCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "snakeCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "screamingSnakeCase": { + "unsafeName": "WEIGHT", + "safeName": "WEIGHT" + }, + "pascalCase": { + "unsafeName": "Weight", + "safeName": "Weight" + } + }, + "wireValue": "weight" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "FLOAT" + } + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Metadata" + } + } + } + ] + }, + "type_:Metadata": { + "type": "undiscriminatedUnion", + "declaration": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "types": [ + { + "_type": "map", + "key": { + "_type": "primitive", + "value": "STRING" + }, + "value": { + "_type": "named", + "value": "type_:MetadataValue" + } + }, + { + "_type": "map", + "key": { + "_type": "primitive", + "value": "STRING" + }, + "value": { + "_type": "unknown" + } + } + ] + }, + "type_:MetadataValue": { + "type": "undiscriminatedUnion", + "declaration": { + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "types": [ + { + "_type": "primitive", + "value": "DOUBLE" + }, + { + "_type": "primitive", + "value": "STRING" + }, + { + "_type": "primitive", + "value": "BOOLEAN" + } + ] + } + }, + "headers": [], + "endpoints": { + "endpoint_userservice.create": { + "auth": null, + "declaration": { + "name": { + "originalName": "create", + "camelCase": { + "unsafeName": "create", + "safeName": "create" + }, + "snakeCase": { + "unsafeName": "create", + "safeName": "create" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE", + "safeName": "CREATE" + }, + "pascalCase": { + "unsafeName": "Create", + "safeName": "Create" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "userservice", + "camelCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "snakeCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "screamingSnakeCase": { + "unsafeName": "USERSERVICE", + "safeName": "USERSERVICE" + }, + "pascalCase": { + "unsafeName": "Userservice", + "safeName": "Userservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "userservice", + "camelCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "snakeCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "screamingSnakeCase": { + "unsafeName": "USERSERVICE", + "safeName": "USERSERVICE" + }, + "pascalCase": { + "unsafeName": "Userservice", + "safeName": "Userservice" + } + } + } + }, + "location": { + "method": "POST", + "path": "/users" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "CreateRequest", + "camelCase": { + "unsafeName": "createRequest", + "safeName": "createRequest" + }, + "snakeCase": { + "unsafeName": "create_request", + "safeName": "create_request" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_REQUEST", + "safeName": "CREATE_REQUEST" + }, + "pascalCase": { + "unsafeName": "CreateRequest", + "safeName": "CreateRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "userservice", + "camelCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "snakeCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "screamingSnakeCase": { + "unsafeName": "USERSERVICE", + "safeName": "USERSERVICE" + }, + "pascalCase": { + "unsafeName": "Userservice", + "safeName": "Userservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "userservice", + "camelCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "snakeCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "screamingSnakeCase": { + "unsafeName": "USERSERVICE", + "safeName": "USERSERVICE" + }, + "pascalCase": { + "unsafeName": "Userservice", + "safeName": "Userservice" + } + } + } + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "body": { + "type": "properties", + "value": [ + { + "name": { + "name": { + "originalName": "username", + "camelCase": { + "unsafeName": "username", + "safeName": "username" + }, + "snakeCase": { + "unsafeName": "username", + "safeName": "username" + }, + "screamingSnakeCase": { + "unsafeName": "USERNAME", + "safeName": "USERNAME" + }, + "pascalCase": { + "unsafeName": "Username", + "safeName": "Username" + } + }, + "wireValue": "username" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "email", + "camelCase": { + "unsafeName": "email", + "safeName": "email" + }, + "snakeCase": { + "unsafeName": "email", + "safeName": "email" + }, + "screamingSnakeCase": { + "unsafeName": "EMAIL", + "safeName": "EMAIL" + }, + "pascalCase": { + "unsafeName": "Email", + "safeName": "Email" + } + }, + "wireValue": "email" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "STRING" + } + } + }, + { + "name": { + "name": { + "originalName": "age", + "camelCase": { + "unsafeName": "age", + "safeName": "age" + }, + "snakeCase": { + "unsafeName": "age", + "safeName": "age" + }, + "screamingSnakeCase": { + "unsafeName": "AGE", + "safeName": "AGE" + }, + "pascalCase": { + "unsafeName": "Age", + "safeName": "Age" + } + }, + "wireValue": "age" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "UINT" + } + } + }, + { + "name": { + "name": { + "originalName": "weight", + "camelCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "snakeCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "screamingSnakeCase": { + "unsafeName": "WEIGHT", + "safeName": "WEIGHT" + }, + "pascalCase": { + "unsafeName": "Weight", + "safeName": "Weight" + } + }, + "wireValue": "weight" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "primitive", + "value": "FLOAT" + } + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "typeReference": { + "_type": "optional", + "value": { + "_type": "named", + "value": "type_:Metadata" + } + } + } + ] + } + }, + "response": { + "type": "json" + } + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Column.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Column.json new file mode 100644 index 00000000000..2e037c2df9c --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Column.json @@ -0,0 +1,100 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "number" + } + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + }, + "indexedData": { + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id", + "values" + ], + "additionalProperties": false, + "definitions": { + "MetadataValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "Metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MetadataValue" + } + }, + { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } + ] + }, + "IndexedData": { + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + } + }, + "values": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "indices", + "values" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__DeleteResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__DeleteResponse.json new file mode 100644 index 00000000000..2b13c5c0434 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__DeleteResponse.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__DescribeResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__DescribeResponse.json new file mode 100644 index 00000000000..ff833e2184b --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__DescribeResponse.json @@ -0,0 +1,70 @@ +{ + "type": "object", + "properties": { + "namespaces": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/NamespaceSummary" + } + }, + { + "type": "null" + } + ] + }, + "dimension": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "fullness": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "totalCount": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "NamespaceSummary": { + "type": "object", + "properties": { + "count": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__FetchResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__FetchResponse.json new file mode 100644 index 00000000000..c08d8b8b3b8 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__FetchResponse.json @@ -0,0 +1,156 @@ +{ + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Column" + } + }, + { + "type": "null" + } + ] + }, + "namespace": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "usage": { + "oneOf": [ + { + "$ref": "#/definitions/Usage" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "MetadataValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "Metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MetadataValue" + } + }, + { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } + ] + }, + "IndexedData": { + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + } + }, + "values": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "indices", + "values" + ], + "additionalProperties": false + }, + "Column": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "number" + } + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + }, + "indexedData": { + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id", + "values" + ], + "additionalProperties": false + }, + "Usage": { + "type": "object", + "properties": { + "units": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__IndexedData.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__IndexedData.json new file mode 100644 index 00000000000..1825538ce91 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__IndexedData.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + } + }, + "values": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "indices", + "values" + ], + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__ListElement.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__ListElement.json new file mode 100644 index 00000000000..05f2b9661f6 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__ListElement.json @@ -0,0 +1,17 @@ +{ + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__ListResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__ListResponse.json new file mode 100644 index 00000000000..d88fde68362 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__ListResponse.json @@ -0,0 +1,100 @@ +{ + "type": "object", + "properties": { + "columns": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ListElement" + } + }, + { + "type": "null" + } + ] + }, + "pagination": { + "oneOf": [ + { + "$ref": "#/definitions/Pagination" + }, + { + "type": "null" + } + ] + }, + "namespace": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "usage": { + "oneOf": [ + { + "$ref": "#/definitions/Usage" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "ListElement": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "Pagination": { + "type": "object", + "properties": { + "next": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "Usage": { + "type": "object", + "properties": { + "units": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Metadata.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Metadata.json new file mode 100644 index 00000000000..cb86dba2f66 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Metadata.json @@ -0,0 +1,38 @@ +{ + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MetadataValue" + } + }, + { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } + ], + "definitions": { + "MetadataValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__MetadataValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__MetadataValue.json new file mode 100644 index 00000000000..8eadd5b7552 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__MetadataValue.json @@ -0,0 +1,14 @@ +{ + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__NamespaceSummary.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__NamespaceSummary.json new file mode 100644 index 00000000000..8643c2cec21 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__NamespaceSummary.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": { + "count": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Pagination.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Pagination.json new file mode 100644 index 00000000000..2ab3ed4b018 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Pagination.json @@ -0,0 +1,17 @@ +{ + "type": "object", + "properties": { + "next": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__QueryColumn.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__QueryColumn.json new file mode 100644 index 00000000000..e8b51935264 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__QueryColumn.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "number" + } + }, + "topK": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "namespace": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + }, + "indexedData": { + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "values" + ], + "additionalProperties": false, + "definitions": { + "MetadataValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "Metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MetadataValue" + } + }, + { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } + ] + }, + "IndexedData": { + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + } + }, + "values": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "indices", + "values" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__QueryResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__QueryResponse.json new file mode 100644 index 00000000000..10daf0c5fd8 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__QueryResponse.json @@ -0,0 +1,214 @@ +{ + "type": "object", + "properties": { + "results": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryResult" + } + }, + { + "type": "null" + } + ] + }, + "matches": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ScoredColumn" + } + }, + { + "type": "null" + } + ] + }, + "namespace": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "usage": { + "oneOf": [ + { + "$ref": "#/definitions/Usage" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "MetadataValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "Metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MetadataValue" + } + }, + { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } + ] + }, + "IndexedData": { + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + } + }, + "values": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "indices", + "values" + ], + "additionalProperties": false + }, + "ScoredColumn": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "score": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + }, + "indexedData": { + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id" + ], + "additionalProperties": false + }, + "QueryResult": { + "type": "object", + "properties": { + "matches": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ScoredColumn" + } + }, + { + "type": "null" + } + ] + }, + "namespace": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "Usage": { + "type": "object", + "properties": { + "units": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__QueryResult.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__QueryResult.json new file mode 100644 index 00000000000..7e4ebc95350 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__QueryResult.json @@ -0,0 +1,145 @@ +{ + "type": "object", + "properties": { + "matches": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ScoredColumn" + } + }, + { + "type": "null" + } + ] + }, + "namespace": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "MetadataValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "Metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MetadataValue" + } + }, + { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } + ] + }, + "IndexedData": { + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + } + }, + "values": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "indices", + "values" + ], + "additionalProperties": false + }, + "ScoredColumn": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "score": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + }, + "indexedData": { + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__ScoredColumn.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__ScoredColumn.json new file mode 100644 index 00000000000..4667e397cdc --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__ScoredColumn.json @@ -0,0 +1,116 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "score": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "values": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + }, + "indexedData": { + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id" + ], + "additionalProperties": false, + "definitions": { + "MetadataValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "Metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MetadataValue" + } + }, + { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } + ] + }, + "IndexedData": { + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + } + }, + "values": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "indices", + "values" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__UpdateResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__UpdateResponse.json new file mode 100644 index 00000000000..2b13c5c0434 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__UpdateResponse.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__UploadResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__UploadResponse.json new file mode 100644 index 00000000000..8643c2cec21 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__UploadResponse.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": { + "count": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Usage.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Usage.json new file mode 100644 index 00000000000..654daa628c2 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__Usage.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": { + "units": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__CreateResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__CreateResponse.json new file mode 100644 index 00000000000..e0ed89188b9 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__CreateResponse.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "user": { + "oneOf": [ + { + "$ref": "#/definitions/UserModel" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "MetadataValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "Metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MetadataValue" + } + }, + { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } + ] + }, + "UserModel": { + "type": "object", + "properties": { + "username": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "weight": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__Metadata.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__Metadata.json new file mode 100644 index 00000000000..cb86dba2f66 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__Metadata.json @@ -0,0 +1,38 @@ +{ + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MetadataValue" + } + }, + { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } + ], + "definitions": { + "MetadataValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__MetadataValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__MetadataValue.json new file mode 100644 index 00000000000..8eadd5b7552 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__MetadataValue.json @@ -0,0 +1,14 @@ +{ + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__UserModel.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__UserModel.json new file mode 100644 index 00000000000..8dc0dd513eb --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto/type__UserModel.json @@ -0,0 +1,95 @@ +{ + "type": "object", + "properties": { + "username": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "weight": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "MetadataValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "Metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MetadataValue" + } + }, + { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/csharp-grpc-proto-exhaustive.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/csharp-grpc-proto-exhaustive.json new file mode 100644 index 00000000000..5578d6d5136 --- /dev/null +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/csharp-grpc-proto-exhaustive.json @@ -0,0 +1,23882 @@ +{ + "fdrApiDefinitionId": null, + "apiVersion": null, + "apiName": { + "originalName": "api", + "camelCase": { + "unsafeName": "api", + "safeName": "api" + }, + "snakeCase": { + "unsafeName": "api", + "safeName": "api" + }, + "screamingSnakeCase": { + "unsafeName": "API", + "safeName": "API" + }, + "pascalCase": { + "unsafeName": "API", + "safeName": "API" + } + }, + "apiDisplayName": "Test API", + "apiDocs": null, + "auth": { + "requirement": "ALL", + "schemes": [], + "docs": null + }, + "headers": [], + "idempotencyHeaders": [], + "types": { + "type_:Column": { + "inline": false, + "name": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [ + "type_:Metadata", + "type_:MetadataValue", + "type_:IndexedData" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:DeleteResponse": { + "inline": false, + "name": { + "name": { + "originalName": "DeleteResponse", + "camelCase": { + "unsafeName": "deleteResponse", + "safeName": "deleteResponse" + }, + "snakeCase": { + "unsafeName": "delete_response", + "safeName": "delete_response" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_RESPONSE", + "safeName": "DELETE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DeleteResponse", + "safeName": "DeleteResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:DeleteResponse" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "DeleteResponse", + "camelCase": { + "unsafeName": "deleteResponse", + "safeName": "deleteResponse" + }, + "snakeCase": { + "unsafeName": "delete_response", + "safeName": "delete_response" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_RESPONSE", + "safeName": "DELETE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DeleteResponse", + "safeName": "DeleteResponse" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:DescribeResponse": { + "inline": false, + "name": { + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:DescribeResponse" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "namespaces", + "camelCase": { + "unsafeName": "namespaces", + "safeName": "namespaces" + }, + "snakeCase": { + "unsafeName": "namespaces", + "safeName": "namespaces" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACES", + "safeName": "NAMESPACES" + }, + "pascalCase": { + "unsafeName": "Namespaces", + "safeName": "Namespaces" + } + }, + "wireValue": "namespaces" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:NamespaceSummary", + "default": null, + "inline": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "dimension", + "camelCase": { + "unsafeName": "dimension", + "safeName": "dimension" + }, + "snakeCase": { + "unsafeName": "dimension", + "safeName": "dimension" + }, + "screamingSnakeCase": { + "unsafeName": "DIMENSION", + "safeName": "DIMENSION" + }, + "pascalCase": { + "unsafeName": "Dimension", + "safeName": "Dimension" + } + }, + "wireValue": "dimension" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "fullness", + "camelCase": { + "unsafeName": "fullness", + "safeName": "fullness" + }, + "snakeCase": { + "unsafeName": "fullness", + "safeName": "fullness" + }, + "screamingSnakeCase": { + "unsafeName": "FULLNESS", + "safeName": "FULLNESS" + }, + "pascalCase": { + "unsafeName": "Fullness", + "safeName": "Fullness" + } + }, + "wireValue": "fullness" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "totalCount", + "camelCase": { + "unsafeName": "totalCount", + "safeName": "totalCount" + }, + "snakeCase": { + "unsafeName": "total_count", + "safeName": "total_count" + }, + "screamingSnakeCase": { + "unsafeName": "TOTAL_COUNT", + "safeName": "TOTAL_COUNT" + }, + "pascalCase": { + "unsafeName": "TotalCount", + "safeName": "TotalCount" + } + }, + "wireValue": "totalCount" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [ + "type_:NamespaceSummary" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:FetchResponse": { + "inline": false, + "name": { + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:FetchResponse" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column", + "default": null, + "inline": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [ + "type_:Column", + "type_:Metadata", + "type_:MetadataValue", + "type_:IndexedData", + "type_:Usage" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:IndexedData": { + "inline": false, + "name": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:ListElement": { + "inline": false, + "name": { + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListElement" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:ListResponse": { + "inline": false, + "name": { + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListResponse" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListElement", + "default": null, + "inline": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "wireValue": "pagination" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Pagination", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [ + "type_:ListElement", + "type_:Pagination", + "type_:Usage" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:NamespaceSummary": { + "inline": false, + "name": { + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:NamespaceSummary" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "count", + "camelCase": { + "unsafeName": "count", + "safeName": "count" + }, + "snakeCase": { + "unsafeName": "count", + "safeName": "count" + }, + "screamingSnakeCase": { + "unsafeName": "COUNT", + "safeName": "COUNT" + }, + "pascalCase": { + "unsafeName": "Count", + "safeName": "Count" + } + }, + "wireValue": "count" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:Pagination": { + "inline": false, + "name": { + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Pagination" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "next", + "camelCase": { + "unsafeName": "next", + "safeName": "next" + }, + "snakeCase": { + "unsafeName": "next", + "safeName": "next" + }, + "screamingSnakeCase": { + "unsafeName": "NEXT", + "safeName": "NEXT" + }, + "pascalCase": { + "unsafeName": "Next", + "safeName": "Next" + } + }, + "wireValue": "next" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:QueryColumn": { + "inline": false, + "name": { + "name": { + "originalName": "QueryColumn", + "camelCase": { + "unsafeName": "queryColumn", + "safeName": "queryColumn" + }, + "snakeCase": { + "unsafeName": "query_column", + "safeName": "query_column" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_COLUMN", + "safeName": "QUERY_COLUMN" + }, + "pascalCase": { + "unsafeName": "QueryColumn", + "safeName": "QueryColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryColumn" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "topK", + "camelCase": { + "unsafeName": "topK", + "safeName": "topK" + }, + "snakeCase": { + "unsafeName": "top_k", + "safeName": "top_k" + }, + "screamingSnakeCase": { + "unsafeName": "TOP_K", + "safeName": "TOP_K" + }, + "pascalCase": { + "unsafeName": "TopK", + "safeName": "TopK" + } + }, + "wireValue": "topK" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [ + "type_:Metadata", + "type_:MetadataValue", + "type_:IndexedData" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "QueryColumn", + "camelCase": { + "unsafeName": "queryColumn", + "safeName": "queryColumn" + }, + "snakeCase": { + "unsafeName": "query_column", + "safeName": "query_column" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_COLUMN", + "safeName": "QUERY_COLUMN" + }, + "pascalCase": { + "unsafeName": "QueryColumn", + "safeName": "QueryColumn" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:QueryResponse": { + "inline": false, + "name": { + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResponse" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "results", + "camelCase": { + "unsafeName": "results", + "safeName": "results" + }, + "snakeCase": { + "unsafeName": "results", + "safeName": "results" + }, + "screamingSnakeCase": { + "unsafeName": "RESULTS", + "safeName": "RESULTS" + }, + "pascalCase": { + "unsafeName": "Results", + "safeName": "Results" + } + }, + "wireValue": "results" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult", + "default": null, + "inline": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "matches", + "camelCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "snakeCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "screamingSnakeCase": { + "unsafeName": "MATCHES", + "safeName": "MATCHES" + }, + "pascalCase": { + "unsafeName": "Matches", + "safeName": "Matches" + } + }, + "wireValue": "matches" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [ + "type_:QueryResult", + "type_:ScoredColumn", + "type_:Metadata", + "type_:MetadataValue", + "type_:IndexedData", + "type_:Usage" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:QueryResult": { + "inline": false, + "name": { + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "matches", + "camelCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "snakeCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "screamingSnakeCase": { + "unsafeName": "MATCHES", + "safeName": "MATCHES" + }, + "pascalCase": { + "unsafeName": "Matches", + "safeName": "Matches" + } + }, + "wireValue": "matches" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [ + "type_:ScoredColumn", + "type_:Metadata", + "type_:MetadataValue", + "type_:IndexedData" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:ScoredColumn": { + "inline": false, + "name": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "score", + "camelCase": { + "unsafeName": "score", + "safeName": "score" + }, + "snakeCase": { + "unsafeName": "score", + "safeName": "score" + }, + "screamingSnakeCase": { + "unsafeName": "SCORE", + "safeName": "SCORE" + }, + "pascalCase": { + "unsafeName": "Score", + "safeName": "Score" + } + }, + "wireValue": "score" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [ + "type_:Metadata", + "type_:MetadataValue", + "type_:IndexedData" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:UpdateResponse": { + "inline": false, + "name": { + "name": { + "originalName": "UpdateResponse", + "camelCase": { + "unsafeName": "updateResponse", + "safeName": "updateResponse" + }, + "snakeCase": { + "unsafeName": "update_response", + "safeName": "update_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE_RESPONSE", + "safeName": "UPDATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UpdateResponse", + "safeName": "UpdateResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UpdateResponse" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "UpdateResponse", + "camelCase": { + "unsafeName": "updateResponse", + "safeName": "updateResponse" + }, + "snakeCase": { + "unsafeName": "update_response", + "safeName": "update_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE_RESPONSE", + "safeName": "UPDATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UpdateResponse", + "safeName": "UpdateResponse" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:UploadResponse": { + "inline": false, + "name": { + "name": { + "originalName": "UploadResponse", + "camelCase": { + "unsafeName": "uploadResponse", + "safeName": "uploadResponse" + }, + "snakeCase": { + "unsafeName": "upload_response", + "safeName": "upload_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_RESPONSE", + "safeName": "UPLOAD_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UploadResponse", + "safeName": "UploadResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UploadResponse" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "count", + "camelCase": { + "unsafeName": "count", + "safeName": "count" + }, + "snakeCase": { + "unsafeName": "count", + "safeName": "count" + }, + "screamingSnakeCase": { + "unsafeName": "COUNT", + "safeName": "COUNT" + }, + "pascalCase": { + "unsafeName": "Count", + "safeName": "Count" + } + }, + "wireValue": "count" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "UploadResponse", + "camelCase": { + "unsafeName": "uploadResponse", + "safeName": "uploadResponse" + }, + "snakeCase": { + "unsafeName": "upload_response", + "safeName": "upload_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_RESPONSE", + "safeName": "UPLOAD_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UploadResponse", + "safeName": "UploadResponse" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:Usage": { + "inline": false, + "name": { + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "units", + "camelCase": { + "unsafeName": "units", + "safeName": "units" + }, + "snakeCase": { + "unsafeName": "units", + "safeName": "units" + }, + "screamingSnakeCase": { + "unsafeName": "UNITS", + "safeName": "UNITS" + }, + "pascalCase": { + "unsafeName": "Units", + "safeName": "Units" + } + }, + "wireValue": "units" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:Metadata": { + "inline": false, + "name": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata" + }, + "shape": { + "_type": "undiscriminatedUnion", + "members": [ + { + "type": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "docs": null + }, + { + "type": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "unknown" + } + } + }, + "docs": null + } + ] + }, + "referencedTypes": [ + "type_:MetadataValue" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "wellKnown", + "value": { + "type": "struct" + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:MetadataValue": { + "inline": false, + "name": { + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue" + }, + "shape": { + "_type": "undiscriminatedUnion", + "members": [ + { + "type": { + "_type": "primitive", + "primitive": { + "v1": "DOUBLE", + "v2": { + "type": "double", + "default": null, + "validation": null + } + } + }, + "docs": null + }, + { + "type": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "docs": null + }, + { + "type": { + "_type": "primitive", + "primitive": { + "v1": "BOOLEAN", + "v2": null + } + }, + "docs": null + } + ] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "wellKnown", + "value": { + "type": "value" + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + } + }, + "errors": {}, + "services": { + "service_dataservice": { + "availability": null, + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + } + }, + "displayName": "DataService", + "basePath": { + "head": "", + "parts": [] + }, + "headers": [], + "pathParameters": [], + "encoding": { + "json": null, + "proto": {} + }, + "transport": { + "type": "grpc", + "service": { + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "DataService", + "camelCase": { + "unsafeName": "dataService", + "safeName": "dataService" + }, + "snakeCase": { + "unsafeName": "data_service", + "safeName": "data_service" + }, + "screamingSnakeCase": { + "unsafeName": "DATA_SERVICE", + "safeName": "DATA_SERVICE" + }, + "pascalCase": { + "unsafeName": "DataService", + "safeName": "DataService" + } + } + } + }, + "endpoints": [ + { + "id": "endpoint_dataservice.foo", + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "displayName": null, + "auth": false, + "idempotent": false, + "baseUrl": null, + "method": "POST", + "basePath": null, + "path": { + "head": "/foo", + "parts": [] + }, + "fullPath": { + "head": "foo", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": null, + "sdkRequest": null, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "unknown" + } + } + }, + "docs": null + } + }, + "status-code": null + }, + "errors": [], + "userSpecifiedExamples": [ + { + "example": { + "id": "3da1df2e522ba96c14c10c68b745bdfb3bff9e3de4ae562c45addca35de12df9", + "name": null, + "url": "/foo", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [], + "serviceHeaders": [], + "queryParameters": [], + "request": null, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "key" + } + } + }, + "jsonExample": "key" + }, + "value": { + "shape": { + "type": "unknown", + "unknown": "value" + }, + "jsonExample": "value" + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "unknown" + } + } + }, + "jsonExample": { + "key": "value" + } + } + } + }, + "docs": null + }, + "codeSamples": null + } + ], + "autogeneratedExamples": [ + { + "example": { + "id": "a6ed54576c86109c3acea4e10911bd296a87ae7e", + "url": "/foo", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": null, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "string" + } + } + }, + "jsonExample": "string" + }, + "value": { + "shape": { + "type": "unknown", + "unknown": { + "key": "value" + } + }, + "jsonExample": { + "key": "value" + } + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "unknown" + } + } + }, + "jsonExample": { + "string": { + "key": "value" + } + } + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": { + "type": "http" + }, + "availability": null, + "docs": null + }, + { + "id": "endpoint_dataservice.upload", + "name": { + "originalName": "upload", + "camelCase": { + "unsafeName": "upload", + "safeName": "upload" + }, + "snakeCase": { + "unsafeName": "upload", + "safeName": "upload" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD", + "safeName": "UPLOAD" + }, + "pascalCase": { + "unsafeName": "Upload", + "safeName": "Upload" + } + }, + "displayName": null, + "auth": false, + "idempotent": false, + "baseUrl": null, + "method": "POST", + "basePath": null, + "path": { + "head": "/data", + "parts": [] + }, + "fullPath": { + "head": "data", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "UploadRequest", + "camelCase": { + "unsafeName": "uploadRequest", + "safeName": "uploadRequest" + }, + "snakeCase": { + "unsafeName": "upload_request", + "safeName": "upload_request" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_REQUEST", + "safeName": "UPLOAD_REQUEST" + }, + "pascalCase": { + "unsafeName": "UploadRequest", + "safeName": "UploadRequest" + } + }, + "extends": [], + "contentType": "application/json", + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [], + "docs": null + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "UploadRequest", + "camelCase": { + "unsafeName": "uploadRequest", + "safeName": "uploadRequest" + }, + "snakeCase": { + "unsafeName": "upload_request", + "safeName": "upload_request" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_REQUEST", + "safeName": "UPLOAD_REQUEST" + }, + "pascalCase": { + "unsafeName": "UploadRequest", + "safeName": "UploadRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + }, + "streamParameter": null + }, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "name": { + "originalName": "UploadResponse", + "camelCase": { + "unsafeName": "uploadResponse", + "safeName": "uploadResponse" + }, + "snakeCase": { + "unsafeName": "upload_response", + "safeName": "upload_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_RESPONSE", + "safeName": "UPLOAD_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UploadResponse", + "safeName": "UploadResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UploadResponse", + "default": null, + "inline": null + }, + "docs": "OK" + } + }, + "status-code": null + }, + "errors": [], + "userSpecifiedExamples": [ + { + "example": { + "id": "e86e562096070c8391794a0e71b5a997edee015f7c2fed9ce955ab36cc14df3d", + "name": null, + "url": "/data", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [], + "serviceHeaders": [], + "queryParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:Column", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + }, + "originalTypeDeclaration": { + "typeId": "type_:Column", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + } + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1 + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:Column", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + } + } + } + ] + } + }, + "jsonExample": { + "id": "id", + "values": [ + 1.1 + ] + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "id": "id", + "values": [ + 1.1 + ] + } + ] + }, + "originalTypeDeclaration": null + } + ], + "jsonExample": { + "columns": [ + { + "id": "id", + "values": [ + 1.1 + ] + } + ] + } + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:UploadResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "UploadResponse", + "camelCase": { + "unsafeName": "uploadResponse", + "safeName": "uploadResponse" + }, + "snakeCase": { + "unsafeName": "upload_response", + "safeName": "upload_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_RESPONSE", + "safeName": "UPLOAD_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UploadResponse", + "safeName": "UploadResponse" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "count", + "camelCase": { + "unsafeName": "count", + "safeName": "count" + }, + "snakeCase": { + "unsafeName": "count", + "safeName": "count" + }, + "screamingSnakeCase": { + "unsafeName": "COUNT", + "safeName": "COUNT" + }, + "pascalCase": { + "unsafeName": "Count", + "safeName": "Count" + } + }, + "wireValue": "count" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + }, + "originalTypeDeclaration": { + "typeId": "type_:UploadResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "UploadResponse", + "camelCase": { + "unsafeName": "uploadResponse", + "safeName": "uploadResponse" + }, + "snakeCase": { + "unsafeName": "upload_response", + "safeName": "upload_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_RESPONSE", + "safeName": "UPLOAD_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UploadResponse", + "safeName": "UploadResponse" + } + } + } + } + ] + } + }, + "jsonExample": { + "count": 1 + } + } + } + }, + "docs": null + }, + "codeSamples": null + } + ], + "autogeneratedExamples": [ + { + "example": { + "id": "d7bb93ad7d65d43ac8f94d109b2d0c8d5fb6f3df", + "url": "/data", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + } + }, + "jsonExample": { + "id": "id", + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + } + }, + "jsonExample": { + "id": "id", + "values": [ + 1.1, + 1.1 + ] + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "id": "id", + "values": [ + 1.1, + 1.1 + ] + }, + { + "id": "id", + "values": [ + 1.1, + 1.1 + ] + } + ] + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + } + } + } + ], + "jsonExample": { + "columns": [ + { + "id": "id", + "values": [ + 1.1, + 1.1 + ] + }, + { + "id": "id", + "values": [ + 1.1, + 1.1 + ] + } + ] + } + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "count", + "camelCase": { + "unsafeName": "count", + "safeName": "count" + }, + "snakeCase": { + "unsafeName": "count", + "safeName": "count" + }, + "screamingSnakeCase": { + "unsafeName": "COUNT", + "safeName": "COUNT" + }, + "pascalCase": { + "unsafeName": "Count", + "safeName": "Count" + } + }, + "wireValue": "count" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "UploadResponse", + "camelCase": { + "unsafeName": "uploadResponse", + "safeName": "uploadResponse" + }, + "snakeCase": { + "unsafeName": "upload_response", + "safeName": "upload_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_RESPONSE", + "safeName": "UPLOAD_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UploadResponse", + "safeName": "UploadResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UploadResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + } + } + ] + }, + "typeName": { + "name": { + "originalName": "UploadResponse", + "camelCase": { + "unsafeName": "uploadResponse", + "safeName": "uploadResponse" + }, + "snakeCase": { + "unsafeName": "upload_response", + "safeName": "upload_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPLOAD_RESPONSE", + "safeName": "UPLOAD_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UploadResponse", + "safeName": "UploadResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UploadResponse" + } + }, + "jsonExample": { + "count": 1 + } + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "availability": null, + "docs": null + }, + { + "id": "endpoint_dataservice.delete", + "name": { + "originalName": "delete", + "camelCase": { + "unsafeName": "delete", + "safeName": "delete" + }, + "snakeCase": { + "unsafeName": "delete", + "safeName": "delete" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE", + "safeName": "DELETE" + }, + "pascalCase": { + "unsafeName": "Delete", + "safeName": "Delete" + } + }, + "displayName": null, + "auth": false, + "idempotent": false, + "baseUrl": null, + "method": "POST", + "basePath": null, + "path": { + "head": "/data/delete", + "parts": [] + }, + "fullPath": { + "head": "data/delete", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "DeleteRequest", + "camelCase": { + "unsafeName": "deleteRequest", + "safeName": "deleteRequest" + }, + "snakeCase": { + "unsafeName": "delete_request", + "safeName": "delete_request" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_REQUEST", + "safeName": "DELETE_REQUEST" + }, + "pascalCase": { + "unsafeName": "DeleteRequest", + "safeName": "DeleteRequest" + } + }, + "extends": [], + "contentType": "application/json", + "properties": [ + { + "name": { + "name": { + "originalName": "ids", + "camelCase": { + "unsafeName": "ids", + "safeName": "ids" + }, + "snakeCase": { + "unsafeName": "ids", + "safeName": "ids" + }, + "screamingSnakeCase": { + "unsafeName": "IDS", + "safeName": "IDS" + }, + "pascalCase": { + "unsafeName": "IDs", + "safeName": "IDs" + } + }, + "wireValue": "ids" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "deleteAll", + "camelCase": { + "unsafeName": "deleteAll", + "safeName": "deleteAll" + }, + "snakeCase": { + "unsafeName": "delete_all", + "safeName": "delete_all" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_ALL", + "safeName": "DELETE_ALL" + }, + "pascalCase": { + "unsafeName": "DeleteAll", + "safeName": "DeleteAll" + } + }, + "wireValue": "deleteAll" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "BOOLEAN", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [], + "docs": null + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "DeleteRequest", + "camelCase": { + "unsafeName": "deleteRequest", + "safeName": "deleteRequest" + }, + "snakeCase": { + "unsafeName": "delete_request", + "safeName": "delete_request" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_REQUEST", + "safeName": "DELETE_REQUEST" + }, + "pascalCase": { + "unsafeName": "DeleteRequest", + "safeName": "DeleteRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + }, + "streamParameter": null + }, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "name": { + "originalName": "DeleteResponse", + "camelCase": { + "unsafeName": "deleteResponse", + "safeName": "deleteResponse" + }, + "snakeCase": { + "unsafeName": "delete_response", + "safeName": "delete_response" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_RESPONSE", + "safeName": "DELETE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DeleteResponse", + "safeName": "DeleteResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:DeleteResponse", + "default": null, + "inline": null + }, + "docs": "OK" + } + }, + "status-code": null + }, + "errors": [], + "userSpecifiedExamples": [ + { + "example": { + "id": "1ad45f4885c23156a886a05b3f8322b0771f825d688aca4279afa1125fbd190d", + "name": null, + "url": "/data/delete", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [], + "serviceHeaders": [], + "queryParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [], + "jsonExample": {} + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:DeleteResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "DeleteResponse", + "camelCase": { + "unsafeName": "deleteResponse", + "safeName": "deleteResponse" + }, + "snakeCase": { + "unsafeName": "delete_response", + "safeName": "delete_response" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_RESPONSE", + "safeName": "DELETE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DeleteResponse", + "safeName": "DeleteResponse" + } + } + }, + "shape": { + "type": "object", + "properties": [] + } + }, + "jsonExample": {} + } + } + }, + "docs": null + }, + "codeSamples": null + } + ], + "autogeneratedExamples": [ + { + "example": { + "id": "005237105b93ad65d88134071ca2be649618351d", + "url": "/data/delete", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [ + { + "name": { + "name": { + "originalName": "ids", + "camelCase": { + "unsafeName": "ids", + "safeName": "ids" + }, + "snakeCase": { + "unsafeName": "ids", + "safeName": "ids" + }, + "screamingSnakeCase": { + "unsafeName": "IDS", + "safeName": "IDS" + }, + "pascalCase": { + "unsafeName": "IDs", + "safeName": "IDs" + } + }, + "wireValue": "ids" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "deleteAll", + "camelCase": { + "unsafeName": "deleteAll", + "safeName": "deleteAll" + }, + "snakeCase": { + "unsafeName": "delete_all", + "safeName": "delete_all" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_ALL", + "safeName": "DELETE_ALL" + }, + "pascalCase": { + "unsafeName": "DeleteAll", + "safeName": "DeleteAll" + } + }, + "wireValue": "deleteAll" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "BOOLEAN", + "v2": null + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + } + } + } + ], + "jsonExample": {} + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [] + }, + "typeName": { + "name": { + "originalName": "DeleteResponse", + "camelCase": { + "unsafeName": "deleteResponse", + "safeName": "deleteResponse" + }, + "snakeCase": { + "unsafeName": "delete_response", + "safeName": "delete_response" + }, + "screamingSnakeCase": { + "unsafeName": "DELETE_RESPONSE", + "safeName": "DELETE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DeleteResponse", + "safeName": "DeleteResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:DeleteResponse" + } + }, + "jsonExample": {} + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "availability": null, + "docs": null + }, + { + "id": "endpoint_dataservice.describe", + "name": { + "originalName": "describe", + "camelCase": { + "unsafeName": "describe", + "safeName": "describe" + }, + "snakeCase": { + "unsafeName": "describe", + "safeName": "describe" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE", + "safeName": "DESCRIBE" + }, + "pascalCase": { + "unsafeName": "Describe", + "safeName": "Describe" + } + }, + "displayName": null, + "auth": false, + "idempotent": false, + "baseUrl": null, + "method": "POST", + "basePath": null, + "path": { + "head": "/data/describe", + "parts": [] + }, + "fullPath": { + "head": "data/describe", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "DescribeRequest", + "camelCase": { + "unsafeName": "describeRequest", + "safeName": "describeRequest" + }, + "snakeCase": { + "unsafeName": "describe_request", + "safeName": "describe_request" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_REQUEST", + "safeName": "DESCRIBE_REQUEST" + }, + "pascalCase": { + "unsafeName": "DescribeRequest", + "safeName": "DescribeRequest" + } + }, + "extends": [], + "contentType": "application/json", + "properties": [ + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [], + "docs": null + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "DescribeRequest", + "camelCase": { + "unsafeName": "describeRequest", + "safeName": "describeRequest" + }, + "snakeCase": { + "unsafeName": "describe_request", + "safeName": "describe_request" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_REQUEST", + "safeName": "DESCRIBE_REQUEST" + }, + "pascalCase": { + "unsafeName": "DescribeRequest", + "safeName": "DescribeRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + }, + "streamParameter": null + }, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:DescribeResponse", + "default": null, + "inline": null + }, + "docs": "OK" + } + }, + "status-code": null + }, + "errors": [], + "userSpecifiedExamples": [ + { + "example": { + "id": "f4fc880cf2279479ac90097ade3ddc327575519d7e8ce9d7a218e40339ad1b45", + "name": null, + "url": "/data/describe", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [], + "serviceHeaders": [], + "queryParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [], + "jsonExample": {} + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:DescribeResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "namespaces", + "camelCase": { + "unsafeName": "namespaces", + "safeName": "namespaces" + }, + "snakeCase": { + "unsafeName": "namespaces", + "safeName": "namespaces" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACES", + "safeName": "NAMESPACES" + }, + "pascalCase": { + "unsafeName": "Namespaces", + "safeName": "Namespaces" + } + }, + "wireValue": "namespaces" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "key" + } + } + }, + "jsonExample": "key" + }, + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:NamespaceSummary", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "count", + "camelCase": { + "unsafeName": "count", + "safeName": "count" + }, + "snakeCase": { + "unsafeName": "count", + "safeName": "count" + }, + "screamingSnakeCase": { + "unsafeName": "COUNT", + "safeName": "COUNT" + }, + "pascalCase": { + "unsafeName": "Count", + "safeName": "Count" + } + }, + "wireValue": "count" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + }, + "originalTypeDeclaration": { + "typeId": "type_:NamespaceSummary", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + } + } + } + ] + } + }, + "jsonExample": { + "count": 1 + } + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:NamespaceSummary", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "key": { + "count": 1 + } + } + }, + "valueType": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:NamespaceSummary", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": { + "key": { + "count": 1 + } + } + }, + "originalTypeDeclaration": { + "typeId": "type_:DescribeResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "dimension", + "camelCase": { + "unsafeName": "dimension", + "safeName": "dimension" + }, + "snakeCase": { + "unsafeName": "dimension", + "safeName": "dimension" + }, + "screamingSnakeCase": { + "unsafeName": "DIMENSION", + "safeName": "DIMENSION" + }, + "pascalCase": { + "unsafeName": "Dimension", + "safeName": "Dimension" + } + }, + "wireValue": "dimension" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + }, + "originalTypeDeclaration": { + "typeId": "type_:DescribeResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "fullness", + "camelCase": { + "unsafeName": "fullness", + "safeName": "fullness" + }, + "snakeCase": { + "unsafeName": "fullness", + "safeName": "fullness" + }, + "screamingSnakeCase": { + "unsafeName": "FULLNESS", + "safeName": "FULLNESS" + }, + "pascalCase": { + "unsafeName": "Fullness", + "safeName": "Fullness" + } + }, + "wireValue": "fullness" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + }, + "originalTypeDeclaration": { + "typeId": "type_:DescribeResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "totalCount", + "camelCase": { + "unsafeName": "totalCount", + "safeName": "totalCount" + }, + "snakeCase": { + "unsafeName": "total_count", + "safeName": "total_count" + }, + "screamingSnakeCase": { + "unsafeName": "TOTAL_COUNT", + "safeName": "TOTAL_COUNT" + }, + "pascalCase": { + "unsafeName": "TotalCount", + "safeName": "TotalCount" + } + }, + "wireValue": "totalCount" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + }, + "originalTypeDeclaration": { + "typeId": "type_:DescribeResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + } + } + } + ] + } + }, + "jsonExample": { + "namespaces": { + "key": { + "count": 1 + } + }, + "dimension": 1, + "fullness": 1.1, + "totalCount": 1 + } + } + } + }, + "docs": null + }, + "codeSamples": null + } + ], + "autogeneratedExamples": [ + { + "example": { + "id": "e8371d94fa58f4b125ff5a2680a34dae539c34fd", + "url": "/data/describe", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [ + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + } + } + } + ], + "jsonExample": {} + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "namespaces", + "camelCase": { + "unsafeName": "namespaces", + "safeName": "namespaces" + }, + "snakeCase": { + "unsafeName": "namespaces", + "safeName": "namespaces" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACES", + "safeName": "NAMESPACES" + }, + "pascalCase": { + "unsafeName": "Namespaces", + "safeName": "Namespaces" + } + }, + "wireValue": "namespaces" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:DescribeResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "namespaces" + } + } + }, + "jsonExample": "namespaces" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "count", + "camelCase": { + "unsafeName": "count", + "safeName": "count" + }, + "snakeCase": { + "unsafeName": "count", + "safeName": "count" + }, + "screamingSnakeCase": { + "unsafeName": "COUNT", + "safeName": "COUNT" + }, + "pascalCase": { + "unsafeName": "Count", + "safeName": "Count" + } + }, + "wireValue": "count" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:NamespaceSummary" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + } + } + ] + }, + "typeName": { + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:NamespaceSummary" + } + }, + "jsonExample": { + "count": 1 + } + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:NamespaceSummary", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "namespaces": { + "count": 1 + } + } + }, + "valueType": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "NamespaceSummary", + "camelCase": { + "unsafeName": "namespaceSummary", + "safeName": "namespaceSummary" + }, + "snakeCase": { + "unsafeName": "namespace_summary", + "safeName": "namespace_summary" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE_SUMMARY", + "safeName": "NAMESPACE_SUMMARY" + }, + "pascalCase": { + "unsafeName": "NamespaceSummary", + "safeName": "NamespaceSummary" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:NamespaceSummary", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": { + "namespaces": { + "count": 1 + } + } + } + }, + { + "name": { + "name": { + "originalName": "dimension", + "camelCase": { + "unsafeName": "dimension", + "safeName": "dimension" + }, + "snakeCase": { + "unsafeName": "dimension", + "safeName": "dimension" + }, + "screamingSnakeCase": { + "unsafeName": "DIMENSION", + "safeName": "DIMENSION" + }, + "pascalCase": { + "unsafeName": "Dimension", + "safeName": "Dimension" + } + }, + "wireValue": "dimension" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:DescribeResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + } + }, + { + "name": { + "name": { + "originalName": "fullness", + "camelCase": { + "unsafeName": "fullness", + "safeName": "fullness" + }, + "snakeCase": { + "unsafeName": "fullness", + "safeName": "fullness" + }, + "screamingSnakeCase": { + "unsafeName": "FULLNESS", + "safeName": "FULLNESS" + }, + "pascalCase": { + "unsafeName": "Fullness", + "safeName": "Fullness" + } + }, + "wireValue": "fullness" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:DescribeResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + } + }, + { + "name": { + "name": { + "originalName": "totalCount", + "camelCase": { + "unsafeName": "totalCount", + "safeName": "totalCount" + }, + "snakeCase": { + "unsafeName": "total_count", + "safeName": "total_count" + }, + "screamingSnakeCase": { + "unsafeName": "TOTAL_COUNT", + "safeName": "TOTAL_COUNT" + }, + "pascalCase": { + "unsafeName": "TotalCount", + "safeName": "TotalCount" + } + }, + "wireValue": "totalCount" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:DescribeResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + } + } + ] + }, + "typeName": { + "name": { + "originalName": "DescribeResponse", + "camelCase": { + "unsafeName": "describeResponse", + "safeName": "describeResponse" + }, + "snakeCase": { + "unsafeName": "describe_response", + "safeName": "describe_response" + }, + "screamingSnakeCase": { + "unsafeName": "DESCRIBE_RESPONSE", + "safeName": "DESCRIBE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "DescribeResponse", + "safeName": "DescribeResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:DescribeResponse" + } + }, + "jsonExample": { + "namespaces": { + "namespaces": { + "count": 1 + } + }, + "dimension": 1, + "fullness": 1.1, + "totalCount": 1 + } + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "availability": null, + "docs": null + }, + { + "id": "endpoint_dataservice.fetch", + "name": { + "originalName": "fetch", + "camelCase": { + "unsafeName": "fetch", + "safeName": "fetch" + }, + "snakeCase": { + "unsafeName": "fetch", + "safeName": "fetch" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH", + "safeName": "FETCH" + }, + "pascalCase": { + "unsafeName": "Fetch", + "safeName": "Fetch" + } + }, + "displayName": null, + "auth": false, + "idempotent": false, + "baseUrl": null, + "method": "GET", + "basePath": null, + "path": { + "head": "/data/fetch", + "parts": [] + }, + "fullPath": { + "head": "data/fetch", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [ + { + "name": { + "name": { + "originalName": "ids", + "camelCase": { + "unsafeName": "ids", + "safeName": "ids" + }, + "snakeCase": { + "unsafeName": "ids", + "safeName": "ids" + }, + "screamingSnakeCase": { + "unsafeName": "IDS", + "safeName": "IDS" + }, + "pascalCase": { + "unsafeName": "IDs", + "safeName": "IDs" + } + }, + "wireValue": "ids" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "allowMultiple": true, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "allowMultiple": false, + "availability": null, + "docs": null + } + ], + "headers": [], + "requestBody": null, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "FetchRequest", + "camelCase": { + "unsafeName": "fetchRequest", + "safeName": "fetchRequest" + }, + "snakeCase": { + "unsafeName": "fetch_request", + "safeName": "fetch_request" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_REQUEST", + "safeName": "FETCH_REQUEST" + }, + "pascalCase": { + "unsafeName": "FetchRequest", + "safeName": "FetchRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + }, + "streamParameter": null + }, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:FetchResponse", + "default": null, + "inline": null + }, + "docs": "OK" + } + }, + "status-code": null + }, + "errors": [], + "userSpecifiedExamples": [ + { + "example": { + "id": "44a627940477817fb2cc64c55008bd26a521e40437f96d4d3288df5b33e383b2", + "name": null, + "url": "/data/fetch", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [], + "serviceHeaders": [], + "queryParameters": [], + "request": null, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:FetchResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "key" + } + } + }, + "jsonExample": "key" + }, + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:Column", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + }, + "originalTypeDeclaration": { + "typeId": "type_:Column", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + } + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1 + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:Column", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + } + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:Metadata", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + } + }, + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "key" + } + } + }, + "jsonExample": "key" + }, + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:MetadataValue", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + } + }, + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "primitive", + "primitive": { + "type": "double", + "double": 1.1 + } + }, + "jsonExample": 1.1 + } + } + }, + "jsonExample": 1.1 + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "key": 1.1 + } + } + } + }, + "jsonExample": { + "key": 1.1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "key": 1.1 + } + }, + "originalTypeDeclaration": { + "typeId": "type_:Column", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:IndexedData", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1 + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:IndexedData", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + } + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1 + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:IndexedData", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + } + } + } + ] + } + }, + "jsonExample": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + }, + "originalTypeDeclaration": { + "typeId": "type_:Column", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + } + } + } + ] + } + }, + "jsonExample": { + "id": "id", + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "key": { + "id": "id", + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + } + }, + "valueType": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": { + "key": { + "id": "id", + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + } + }, + "originalTypeDeclaration": { + "typeId": "type_:FetchResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "namespace" + } + } + }, + "jsonExample": "namespace" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "namespace" + }, + "originalTypeDeclaration": { + "typeId": "type_:FetchResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:Usage", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "units", + "camelCase": { + "unsafeName": "units", + "safeName": "units" + }, + "snakeCase": { + "unsafeName": "units", + "safeName": "units" + }, + "screamingSnakeCase": { + "unsafeName": "UNITS", + "safeName": "UNITS" + }, + "pascalCase": { + "unsafeName": "Units", + "safeName": "Units" + } + }, + "wireValue": "units" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + }, + "originalTypeDeclaration": { + "typeId": "type_:Usage", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + } + } + } + ] + } + }, + "jsonExample": { + "units": 1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "units": 1 + } + }, + "originalTypeDeclaration": { + "typeId": "type_:FetchResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + } + } + } + ] + } + }, + "jsonExample": { + "columns": { + "key": { + "id": "id", + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + }, + "namespace": "namespace", + "usage": { + "units": 1 + } + } + } + } + }, + "docs": null + }, + "codeSamples": null + } + ], + "autogeneratedExamples": [ + { + "example": { + "id": "b6a313102d6486073540f516aba014ac628d3b6d", + "url": "/data/fetch", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": null, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:FetchResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "columns" + } + } + }, + "jsonExample": "columns" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "metadata" + } + } + }, + "jsonExample": "metadata" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "primitive", + "primitive": { + "type": "double", + "double": 1.1 + } + }, + "jsonExample": 1.1 + } + }, + "typeName": { + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue" + } + }, + "jsonExample": 1.1 + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "metadata": 1.1 + } + } + }, + "typeName": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata" + } + }, + "jsonExample": { + "metadata": 1.1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "metadata": 1.1 + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1, + 1 + ] + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + } + ] + }, + "typeName": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column" + } + }, + "jsonExample": { + "id": "id", + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "columns": { + "id": "id", + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + }, + "valueType": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Column", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": { + "columns": { + "id": "id", + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:FetchResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "namespace" + } + } + }, + "jsonExample": "namespace" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "namespace" + } + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:FetchResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "units", + "camelCase": { + "unsafeName": "units", + "safeName": "units" + }, + "snakeCase": { + "unsafeName": "units", + "safeName": "units" + }, + "screamingSnakeCase": { + "unsafeName": "UNITS", + "safeName": "UNITS" + }, + "pascalCase": { + "unsafeName": "Units", + "safeName": "Units" + } + }, + "wireValue": "units" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + } + } + ] + }, + "typeName": { + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage" + } + }, + "jsonExample": { + "units": 1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "units": 1 + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "FetchResponse", + "camelCase": { + "unsafeName": "fetchResponse", + "safeName": "fetchResponse" + }, + "snakeCase": { + "unsafeName": "fetch_response", + "safeName": "fetch_response" + }, + "screamingSnakeCase": { + "unsafeName": "FETCH_RESPONSE", + "safeName": "FETCH_RESPONSE" + }, + "pascalCase": { + "unsafeName": "FetchResponse", + "safeName": "FetchResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:FetchResponse" + } + }, + "jsonExample": { + "columns": { + "columns": { + "id": "id", + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + }, + "namespace": "namespace", + "usage": { + "units": 1 + } + } + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "availability": null, + "docs": null + }, + { + "id": "endpoint_dataservice.list", + "name": { + "originalName": "list", + "camelCase": { + "unsafeName": "list", + "safeName": "list" + }, + "snakeCase": { + "unsafeName": "list", + "safeName": "list" + }, + "screamingSnakeCase": { + "unsafeName": "LIST", + "safeName": "LIST" + }, + "pascalCase": { + "unsafeName": "List", + "safeName": "List" + } + }, + "displayName": null, + "auth": false, + "idempotent": false, + "baseUrl": null, + "method": "GET", + "basePath": null, + "path": { + "head": "/data/list", + "parts": [] + }, + "fullPath": { + "head": "data/list", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [ + { + "name": { + "name": { + "originalName": "prefix", + "camelCase": { + "unsafeName": "prefix", + "safeName": "prefix" + }, + "snakeCase": { + "unsafeName": "prefix", + "safeName": "prefix" + }, + "screamingSnakeCase": { + "unsafeName": "PREFIX", + "safeName": "PREFIX" + }, + "pascalCase": { + "unsafeName": "Prefix", + "safeName": "Prefix" + } + }, + "wireValue": "prefix" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "allowMultiple": false, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "limit", + "camelCase": { + "unsafeName": "limit", + "safeName": "limit" + }, + "snakeCase": { + "unsafeName": "limit", + "safeName": "limit" + }, + "screamingSnakeCase": { + "unsafeName": "LIMIT", + "safeName": "LIMIT" + }, + "pascalCase": { + "unsafeName": "Limit", + "safeName": "Limit" + } + }, + "wireValue": "limit" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "allowMultiple": false, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "paginationToken", + "camelCase": { + "unsafeName": "paginationToken", + "safeName": "paginationToken" + }, + "snakeCase": { + "unsafeName": "pagination_token", + "safeName": "pagination_token" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION_TOKEN", + "safeName": "PAGINATION_TOKEN" + }, + "pascalCase": { + "unsafeName": "PaginationToken", + "safeName": "PaginationToken" + } + }, + "wireValue": "paginationToken" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "allowMultiple": false, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "allowMultiple": false, + "availability": null, + "docs": null + } + ], + "headers": [], + "requestBody": null, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "ListRequest", + "camelCase": { + "unsafeName": "listRequest", + "safeName": "listRequest" + }, + "snakeCase": { + "unsafeName": "list_request", + "safeName": "list_request" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_REQUEST", + "safeName": "LIST_REQUEST" + }, + "pascalCase": { + "unsafeName": "ListRequest", + "safeName": "ListRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + }, + "streamParameter": null + }, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListResponse", + "default": null, + "inline": null + }, + "docs": "OK" + } + }, + "status-code": null + }, + "errors": [], + "userSpecifiedExamples": [ + { + "example": { + "id": "9543af1bddccf29c8614c606158a275ab88f7a7cbecf8a71dfc4177c3fbbc388", + "name": null, + "url": "/data/list", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [], + "serviceHeaders": [], + "queryParameters": [], + "request": null, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:ListResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:ListElement", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "id" + }, + "originalTypeDeclaration": { + "typeId": "type_:ListElement", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + } + } + } + ] + } + }, + "jsonExample": { + "id": "id" + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListElement", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "id": "id" + } + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListElement", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": [ + { + "id": "id" + } + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:ListResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "wireValue": "pagination" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:Pagination", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "next", + "camelCase": { + "unsafeName": "next", + "safeName": "next" + }, + "snakeCase": { + "unsafeName": "next", + "safeName": "next" + }, + "screamingSnakeCase": { + "unsafeName": "NEXT", + "safeName": "NEXT" + }, + "pascalCase": { + "unsafeName": "Next", + "safeName": "Next" + } + }, + "wireValue": "next" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "next" + } + } + }, + "jsonExample": "next" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "next" + }, + "originalTypeDeclaration": { + "typeId": "type_:Pagination", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + } + } + } + ] + } + }, + "jsonExample": { + "next": "next" + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Pagination", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "next": "next" + } + }, + "originalTypeDeclaration": { + "typeId": "type_:ListResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "namespace" + } + } + }, + "jsonExample": "namespace" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "namespace" + }, + "originalTypeDeclaration": { + "typeId": "type_:ListResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:Usage", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "units", + "camelCase": { + "unsafeName": "units", + "safeName": "units" + }, + "snakeCase": { + "unsafeName": "units", + "safeName": "units" + }, + "screamingSnakeCase": { + "unsafeName": "UNITS", + "safeName": "UNITS" + }, + "pascalCase": { + "unsafeName": "Units", + "safeName": "Units" + } + }, + "wireValue": "units" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + }, + "originalTypeDeclaration": { + "typeId": "type_:Usage", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + } + } + } + ] + } + }, + "jsonExample": { + "units": 1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "units": 1 + } + }, + "originalTypeDeclaration": { + "typeId": "type_:ListResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + } + } + } + ] + } + }, + "jsonExample": { + "columns": [ + { + "id": "id" + } + ], + "pagination": { + "next": "next" + }, + "namespace": "namespace", + "usage": { + "units": 1 + } + } + } + } + }, + "docs": null + }, + "codeSamples": null + } + ], + "autogeneratedExamples": [ + { + "example": { + "id": "0ce8544c4eb09be916024a6c197068c471074f03", + "url": "/data/list", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": null, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "columns", + "camelCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "snakeCase": { + "unsafeName": "columns", + "safeName": "columns" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMNS", + "safeName": "COLUMNS" + }, + "pascalCase": { + "unsafeName": "Columns", + "safeName": "Columns" + } + }, + "wireValue": "columns" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListElement" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "id" + } + } + ] + }, + "typeName": { + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListElement" + } + }, + "jsonExample": { + "id": "id" + } + }, + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListElement" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "id" + } + } + ] + }, + "typeName": { + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListElement" + } + }, + "jsonExample": { + "id": "id" + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListElement", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "id": "id" + }, + { + "id": "id" + } + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ListElement", + "camelCase": { + "unsafeName": "listElement", + "safeName": "listElement" + }, + "snakeCase": { + "unsafeName": "list_element", + "safeName": "list_element" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ELEMENT", + "safeName": "LIST_ELEMENT" + }, + "pascalCase": { + "unsafeName": "ListElement", + "safeName": "ListElement" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListElement", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": [ + { + "id": "id" + }, + { + "id": "id" + } + ] + } + }, + { + "name": { + "name": { + "originalName": "pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "wireValue": "pagination" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "next", + "camelCase": { + "unsafeName": "next", + "safeName": "next" + }, + "snakeCase": { + "unsafeName": "next", + "safeName": "next" + }, + "screamingSnakeCase": { + "unsafeName": "NEXT", + "safeName": "NEXT" + }, + "pascalCase": { + "unsafeName": "Next", + "safeName": "Next" + } + }, + "wireValue": "next" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Pagination" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "next" + } + } + }, + "jsonExample": "next" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "next" + } + } + ] + }, + "typeName": { + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Pagination" + } + }, + "jsonExample": { + "next": "next" + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Pagination", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "next": "next" + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "namespace" + } + } + }, + "jsonExample": "namespace" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "namespace" + } + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "units", + "camelCase": { + "unsafeName": "units", + "safeName": "units" + }, + "snakeCase": { + "unsafeName": "units", + "safeName": "units" + }, + "screamingSnakeCase": { + "unsafeName": "UNITS", + "safeName": "UNITS" + }, + "pascalCase": { + "unsafeName": "Units", + "safeName": "Units" + } + }, + "wireValue": "units" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + } + } + ] + }, + "typeName": { + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage" + } + }, + "jsonExample": { + "units": 1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "units": 1 + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "ListResponse", + "camelCase": { + "unsafeName": "listResponse", + "safeName": "listResponse" + }, + "snakeCase": { + "unsafeName": "list_response", + "safeName": "list_response" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_RESPONSE", + "safeName": "LIST_RESPONSE" + }, + "pascalCase": { + "unsafeName": "ListResponse", + "safeName": "ListResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ListResponse" + } + }, + "jsonExample": { + "columns": [ + { + "id": "id" + }, + { + "id": "id" + } + ], + "pagination": { + "next": "next" + }, + "namespace": "namespace", + "usage": { + "units": 1 + } + } + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "availability": null, + "docs": null + }, + { + "id": "endpoint_dataservice.query", + "name": { + "originalName": "query", + "camelCase": { + "unsafeName": "query", + "safeName": "query" + }, + "snakeCase": { + "unsafeName": "query", + "safeName": "query" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY", + "safeName": "QUERY" + }, + "pascalCase": { + "unsafeName": "Query", + "safeName": "Query" + } + }, + "displayName": null, + "auth": false, + "idempotent": false, + "baseUrl": null, + "method": "POST", + "basePath": null, + "path": { + "head": "/data/query", + "parts": [] + }, + "fullPath": { + "head": "data/query", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "QueryRequest", + "camelCase": { + "unsafeName": "queryRequest", + "safeName": "queryRequest" + }, + "snakeCase": { + "unsafeName": "query_request", + "safeName": "query_request" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_REQUEST", + "safeName": "QUERY_REQUEST" + }, + "pascalCase": { + "unsafeName": "QueryRequest", + "safeName": "QueryRequest" + } + }, + "extends": [], + "contentType": "application/json", + "properties": [ + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "topK", + "camelCase": { + "unsafeName": "topK", + "safeName": "topK" + }, + "snakeCase": { + "unsafeName": "top_k", + "safeName": "top_k" + }, + "screamingSnakeCase": { + "unsafeName": "TOP_K", + "safeName": "TOP_K" + }, + "pascalCase": { + "unsafeName": "TopK", + "safeName": "TopK" + } + }, + "wireValue": "topK" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "includeValues", + "camelCase": { + "unsafeName": "includeValues", + "safeName": "includeValues" + }, + "snakeCase": { + "unsafeName": "include_values", + "safeName": "include_values" + }, + "screamingSnakeCase": { + "unsafeName": "INCLUDE_VALUES", + "safeName": "INCLUDE_VALUES" + }, + "pascalCase": { + "unsafeName": "IncludeValues", + "safeName": "IncludeValues" + } + }, + "wireValue": "includeValues" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "BOOLEAN", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "includeMetadata", + "camelCase": { + "unsafeName": "includeMetadata", + "safeName": "includeMetadata" + }, + "snakeCase": { + "unsafeName": "include_metadata", + "safeName": "include_metadata" + }, + "screamingSnakeCase": { + "unsafeName": "INCLUDE_METADATA", + "safeName": "INCLUDE_METADATA" + }, + "pascalCase": { + "unsafeName": "IncludeMetadata", + "safeName": "IncludeMetadata" + } + }, + "wireValue": "includeMetadata" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "BOOLEAN", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "queries", + "camelCase": { + "unsafeName": "queries", + "safeName": "queries" + }, + "snakeCase": { + "unsafeName": "queries", + "safeName": "queries" + }, + "screamingSnakeCase": { + "unsafeName": "QUERIES", + "safeName": "QUERIES" + }, + "pascalCase": { + "unsafeName": "Queries", + "safeName": "Queries" + } + }, + "wireValue": "queries" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "QueryColumn", + "camelCase": { + "unsafeName": "queryColumn", + "safeName": "queryColumn" + }, + "snakeCase": { + "unsafeName": "query_column", + "safeName": "query_column" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_COLUMN", + "safeName": "QUERY_COLUMN" + }, + "pascalCase": { + "unsafeName": "QueryColumn", + "safeName": "QueryColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryColumn", + "default": null, + "inline": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "wireValue": "column" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [], + "docs": null + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "QueryRequest", + "camelCase": { + "unsafeName": "queryRequest", + "safeName": "queryRequest" + }, + "snakeCase": { + "unsafeName": "query_request", + "safeName": "query_request" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_REQUEST", + "safeName": "QUERY_REQUEST" + }, + "pascalCase": { + "unsafeName": "QueryRequest", + "safeName": "QueryRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + }, + "streamParameter": null + }, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResponse", + "default": null, + "inline": null + }, + "docs": "OK" + } + }, + "status-code": null + }, + "errors": [], + "userSpecifiedExamples": [ + { + "example": { + "id": "f77373ecb6330a27ee2400df3faa815d5e9e5e202b2b3155cf86e1082c1a0416", + "name": null, + "url": "/data/query", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [], + "serviceHeaders": [], + "queryParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [ + { + "name": { + "name": { + "originalName": "topK", + "camelCase": { + "unsafeName": "topK", + "safeName": "topK" + }, + "snakeCase": { + "unsafeName": "top_k", + "safeName": "top_k" + }, + "screamingSnakeCase": { + "unsafeName": "TOP_K", + "safeName": "TOP_K" + }, + "pascalCase": { + "unsafeName": "TopK", + "safeName": "TopK" + } + }, + "wireValue": "topK" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "originalTypeDeclaration": null + } + ], + "jsonExample": { + "topK": 1 + } + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:QueryResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "results", + "camelCase": { + "unsafeName": "results", + "safeName": "results" + }, + "snakeCase": { + "unsafeName": "results", + "safeName": "results" + }, + "screamingSnakeCase": { + "unsafeName": "RESULTS", + "safeName": "RESULTS" + }, + "pascalCase": { + "unsafeName": "Results", + "safeName": "Results" + } + }, + "wireValue": "results" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:QueryResult", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "matches", + "camelCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "snakeCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "screamingSnakeCase": { + "unsafeName": "MATCHES", + "safeName": "MATCHES" + }, + "pascalCase": { + "unsafeName": "Matches", + "safeName": "Matches" + } + }, + "wireValue": "matches" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:ScoredColumn", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + }, + "originalTypeDeclaration": { + "typeId": "type_:ScoredColumn", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + } + } + } + ] + } + }, + "jsonExample": { + "id": "id" + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "id": "id" + } + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": [ + { + "id": "id" + } + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:QueryResult", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "namespace" + } + } + }, + "jsonExample": "namespace" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "namespace" + }, + "originalTypeDeclaration": { + "typeId": "type_:QueryResult", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + } + } + } + ] + } + }, + "jsonExample": { + "matches": [ + { + "id": "id" + } + ], + "namespace": "namespace" + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "matches": [ + { + "id": "id" + } + ], + "namespace": "namespace" + } + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": [ + { + "matches": [ + { + "id": "id" + } + ], + "namespace": "namespace" + } + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:QueryResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "matches", + "camelCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "snakeCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "screamingSnakeCase": { + "unsafeName": "MATCHES", + "safeName": "MATCHES" + }, + "pascalCase": { + "unsafeName": "Matches", + "safeName": "Matches" + } + }, + "wireValue": "matches" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:ScoredColumn", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + }, + "originalTypeDeclaration": { + "typeId": "type_:ScoredColumn", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + } + } + }, + { + "name": { + "name": { + "originalName": "score", + "camelCase": { + "unsafeName": "score", + "safeName": "score" + }, + "snakeCase": { + "unsafeName": "score", + "safeName": "score" + }, + "screamingSnakeCase": { + "unsafeName": "SCORE", + "safeName": "SCORE" + }, + "pascalCase": { + "unsafeName": "Score", + "safeName": "Score" + } + }, + "wireValue": "score" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + }, + "originalTypeDeclaration": { + "typeId": "type_:ScoredColumn", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + } + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1 + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + "jsonExample": [ + 1.1 + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:ScoredColumn", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + } + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:Metadata", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + } + }, + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "key" + } + } + }, + "jsonExample": "key" + }, + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:MetadataValue", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + } + }, + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "primitive", + "primitive": { + "type": "double", + "double": 1.1 + } + }, + "jsonExample": 1.1 + } + } + }, + "jsonExample": 1.1 + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "key": 1.1 + } + } + } + }, + "jsonExample": { + "key": 1.1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "key": 1.1 + } + }, + "originalTypeDeclaration": { + "typeId": "type_:ScoredColumn", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:IndexedData", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1 + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:IndexedData", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + } + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1 + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:IndexedData", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + } + } + } + ] + } + }, + "jsonExample": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + }, + "originalTypeDeclaration": { + "typeId": "type_:ScoredColumn", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + } + } + } + ] + } + }, + "jsonExample": { + "id": "id", + "score": 1.1, + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + ] + }, + "originalTypeDeclaration": { + "typeId": "type_:QueryResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "namespace" + } + } + }, + "jsonExample": "namespace" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "namespace" + }, + "originalTypeDeclaration": { + "typeId": "type_:QueryResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + } + } + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:Usage", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "units", + "camelCase": { + "unsafeName": "units", + "safeName": "units" + }, + "snakeCase": { + "unsafeName": "units", + "safeName": "units" + }, + "screamingSnakeCase": { + "unsafeName": "UNITS", + "safeName": "UNITS" + }, + "pascalCase": { + "unsafeName": "Units", + "safeName": "Units" + } + }, + "wireValue": "units" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + }, + "originalTypeDeclaration": { + "typeId": "type_:Usage", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + } + } + } + ] + } + }, + "jsonExample": { + "units": 1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "units": 1 + } + }, + "originalTypeDeclaration": { + "typeId": "type_:QueryResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + } + } + } + ] + } + }, + "jsonExample": { + "results": [ + { + "matches": [ + { + "id": "id" + } + ], + "namespace": "namespace" + } + ], + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + ], + "namespace": "namespace", + "usage": { + "units": 1 + } + } + } + } + }, + "docs": null + }, + "codeSamples": null + } + ], + "autogeneratedExamples": [ + { + "example": { + "id": "f07cb28de739a8f6d40b467de94ad689ce6713dc", + "url": "/data/query", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [ + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "topK", + "camelCase": { + "unsafeName": "topK", + "safeName": "topK" + }, + "snakeCase": { + "unsafeName": "top_k", + "safeName": "top_k" + }, + "screamingSnakeCase": { + "unsafeName": "TOP_K", + "safeName": "TOP_K" + }, + "pascalCase": { + "unsafeName": "TopK", + "safeName": "TopK" + } + }, + "wireValue": "topK" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + } + }, + { + "name": { + "name": { + "originalName": "filter", + "camelCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "snakeCase": { + "unsafeName": "filter", + "safeName": "filter" + }, + "screamingSnakeCase": { + "unsafeName": "FILTER", + "safeName": "FILTER" + }, + "pascalCase": { + "unsafeName": "Filter", + "safeName": "Filter" + } + }, + "wireValue": "filter" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "includeValues", + "camelCase": { + "unsafeName": "includeValues", + "safeName": "includeValues" + }, + "snakeCase": { + "unsafeName": "include_values", + "safeName": "include_values" + }, + "screamingSnakeCase": { + "unsafeName": "INCLUDE_VALUES", + "safeName": "INCLUDE_VALUES" + }, + "pascalCase": { + "unsafeName": "IncludeValues", + "safeName": "IncludeValues" + } + }, + "wireValue": "includeValues" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "BOOLEAN", + "v2": null + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "includeMetadata", + "camelCase": { + "unsafeName": "includeMetadata", + "safeName": "includeMetadata" + }, + "snakeCase": { + "unsafeName": "include_metadata", + "safeName": "include_metadata" + }, + "screamingSnakeCase": { + "unsafeName": "INCLUDE_METADATA", + "safeName": "INCLUDE_METADATA" + }, + "pascalCase": { + "unsafeName": "IncludeMetadata", + "safeName": "IncludeMetadata" + } + }, + "wireValue": "includeMetadata" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "BOOLEAN", + "v2": null + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "queries", + "camelCase": { + "unsafeName": "queries", + "safeName": "queries" + }, + "snakeCase": { + "unsafeName": "queries", + "safeName": "queries" + }, + "screamingSnakeCase": { + "unsafeName": "QUERIES", + "safeName": "QUERIES" + }, + "pascalCase": { + "unsafeName": "Queries", + "safeName": "Queries" + } + }, + "wireValue": "queries" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "QueryColumn", + "camelCase": { + "unsafeName": "queryColumn", + "safeName": "queryColumn" + }, + "snakeCase": { + "unsafeName": "query_column", + "safeName": "query_column" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_COLUMN", + "safeName": "QUERY_COLUMN" + }, + "pascalCase": { + "unsafeName": "QueryColumn", + "safeName": "QueryColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryColumn", + "default": null, + "inline": null + } + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "column", + "camelCase": { + "unsafeName": "column", + "safeName": "column" + }, + "snakeCase": { + "unsafeName": "column", + "safeName": "column" + }, + "screamingSnakeCase": { + "unsafeName": "COLUMN", + "safeName": "COLUMN" + }, + "pascalCase": { + "unsafeName": "Column", + "safeName": "Column" + } + }, + "wireValue": "column" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + } + } + } + ], + "jsonExample": { + "topK": 1 + } + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "results", + "camelCase": { + "unsafeName": "results", + "safeName": "results" + }, + "snakeCase": { + "unsafeName": "results", + "safeName": "results" + }, + "screamingSnakeCase": { + "unsafeName": "RESULTS", + "safeName": "RESULTS" + }, + "pascalCase": { + "unsafeName": "Results", + "safeName": "Results" + } + }, + "wireValue": "results" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "matches", + "camelCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "snakeCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "screamingSnakeCase": { + "unsafeName": "MATCHES", + "safeName": "MATCHES" + }, + "pascalCase": { + "unsafeName": "Matches", + "safeName": "Matches" + } + }, + "wireValue": "matches" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + } + }, + { + "name": { + "name": { + "originalName": "score", + "camelCase": { + "unsafeName": "score", + "safeName": "score" + }, + "snakeCase": { + "unsafeName": "score", + "safeName": "score" + }, + "screamingSnakeCase": { + "unsafeName": "SCORE", + "safeName": "SCORE" + }, + "pascalCase": { + "unsafeName": "Score", + "safeName": "Score" + } + }, + "wireValue": "score" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": {} + } + }, + "typeName": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata" + } + }, + "jsonExample": {} + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": {} + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1, + 1 + ] + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + } + ] + }, + "typeName": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + } + }, + "jsonExample": { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + }, + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + } + }, + { + "name": { + "name": { + "originalName": "score", + "camelCase": { + "unsafeName": "score", + "safeName": "score" + }, + "snakeCase": { + "unsafeName": "score", + "safeName": "score" + }, + "screamingSnakeCase": { + "unsafeName": "SCORE", + "safeName": "SCORE" + }, + "pascalCase": { + "unsafeName": "Score", + "safeName": "Score" + } + }, + "wireValue": "score" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": {} + } + }, + "typeName": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata" + } + }, + "jsonExample": {} + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": {} + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1, + 1 + ] + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + } + ] + }, + "typeName": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + } + }, + "jsonExample": { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ] + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "namespace" + } + } + }, + "jsonExample": "namespace" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "namespace" + } + } + ] + }, + "typeName": { + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult" + } + }, + "jsonExample": { + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ], + "namespace": "namespace" + } + }, + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "matches", + "camelCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "snakeCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "screamingSnakeCase": { + "unsafeName": "MATCHES", + "safeName": "MATCHES" + }, + "pascalCase": { + "unsafeName": "Matches", + "safeName": "Matches" + } + }, + "wireValue": "matches" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + } + }, + { + "name": { + "name": { + "originalName": "score", + "camelCase": { + "unsafeName": "score", + "safeName": "score" + }, + "snakeCase": { + "unsafeName": "score", + "safeName": "score" + }, + "screamingSnakeCase": { + "unsafeName": "SCORE", + "safeName": "SCORE" + }, + "pascalCase": { + "unsafeName": "Score", + "safeName": "Score" + } + }, + "wireValue": "score" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": {} + } + }, + "typeName": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata" + } + }, + "jsonExample": {} + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": {} + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1, + 1 + ] + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + } + ] + }, + "typeName": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + } + }, + "jsonExample": { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + }, + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + } + }, + { + "name": { + "name": { + "originalName": "score", + "camelCase": { + "unsafeName": "score", + "safeName": "score" + }, + "snakeCase": { + "unsafeName": "score", + "safeName": "score" + }, + "screamingSnakeCase": { + "unsafeName": "SCORE", + "safeName": "SCORE" + }, + "pascalCase": { + "unsafeName": "Score", + "safeName": "Score" + } + }, + "wireValue": "score" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": {} + } + }, + "typeName": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata" + } + }, + "jsonExample": {} + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": {} + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1, + 1 + ] + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + } + ] + }, + "typeName": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + } + }, + "jsonExample": { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ] + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "namespace" + } + } + }, + "jsonExample": "namespace" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "namespace" + } + } + ] + }, + "typeName": { + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult" + } + }, + "jsonExample": { + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ], + "namespace": "namespace" + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ], + "namespace": "namespace" + }, + { + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ], + "namespace": "namespace" + } + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "QueryResult", + "camelCase": { + "unsafeName": "queryResult", + "safeName": "queryResult" + }, + "snakeCase": { + "unsafeName": "query_result", + "safeName": "query_result" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESULT", + "safeName": "QUERY_RESULT" + }, + "pascalCase": { + "unsafeName": "QueryResult", + "safeName": "QueryResult" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResult", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": [ + { + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ], + "namespace": "namespace" + }, + { + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ], + "namespace": "namespace" + } + ] + } + }, + { + "name": { + "name": { + "originalName": "matches", + "camelCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "snakeCase": { + "unsafeName": "matches", + "safeName": "matches" + }, + "screamingSnakeCase": { + "unsafeName": "MATCHES", + "safeName": "MATCHES" + }, + "pascalCase": { + "unsafeName": "Matches", + "safeName": "Matches" + } + }, + "wireValue": "matches" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + } + }, + { + "name": { + "name": { + "originalName": "score", + "camelCase": { + "unsafeName": "score", + "safeName": "score" + }, + "snakeCase": { + "unsafeName": "score", + "safeName": "score" + }, + "screamingSnakeCase": { + "unsafeName": "SCORE", + "safeName": "SCORE" + }, + "pascalCase": { + "unsafeName": "Score", + "safeName": "Score" + } + }, + "wireValue": "score" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "metadata" + } + } + }, + "jsonExample": "metadata" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "primitive", + "primitive": { + "type": "double", + "double": 1.1 + } + }, + "jsonExample": 1.1 + } + }, + "typeName": { + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue" + } + }, + "jsonExample": 1.1 + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "metadata": 1.1 + } + } + }, + "typeName": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata" + } + }, + "jsonExample": { + "metadata": 1.1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "metadata": 1.1 + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1, + 1 + ] + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + } + ] + }, + "typeName": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + } + }, + "jsonExample": { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + }, + { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + } + }, + { + "name": { + "name": { + "originalName": "score", + "camelCase": { + "unsafeName": "score", + "safeName": "score" + }, + "snakeCase": { + "unsafeName": "score", + "safeName": "score" + }, + "screamingSnakeCase": { + "unsafeName": "SCORE", + "safeName": "SCORE" + }, + "pascalCase": { + "unsafeName": "Score", + "safeName": "Score" + } + }, + "wireValue": "score" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "metadata" + } + } + }, + "jsonExample": "metadata" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "primitive", + "primitive": { + "type": "double", + "double": 1.1 + } + }, + "jsonExample": 1.1 + } + }, + "typeName": { + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue" + } + }, + "jsonExample": 1.1 + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "metadata": 1.1 + } + } + }, + "typeName": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata" + } + }, + "jsonExample": { + "metadata": 1.1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "metadata": 1.1 + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "indices", + "camelCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "snakeCase": { + "unsafeName": "indices", + "safeName": "indices" + }, + "screamingSnakeCase": { + "unsafeName": "INDICES", + "safeName": "INDICES" + }, + "pascalCase": { + "unsafeName": "Indices", + "safeName": "Indices" + } + }, + "wireValue": "indices" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1, + 1 + ] + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "list", + "list": [ + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + } + ], + "itemType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": [ + 1.1, + 1.1 + ] + } + } + ] + }, + "typeName": { + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData" + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn" + } + }, + "jsonExample": { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + } + ], + "itemType": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + }, + "jsonExample": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ] + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ScoredColumn", + "camelCase": { + "unsafeName": "scoredColumn", + "safeName": "scoredColumn" + }, + "snakeCase": { + "unsafeName": "scored_column", + "safeName": "scored_column" + }, + "screamingSnakeCase": { + "unsafeName": "SCORED_COLUMN", + "safeName": "SCORED_COLUMN" + }, + "pascalCase": { + "unsafeName": "ScoredColumn", + "safeName": "ScoredColumn" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:ScoredColumn", + "default": null, + "inline": null + } + } + } + } + }, + "jsonExample": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ] + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "namespace" + } + } + }, + "jsonExample": "namespace" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "namespace" + } + }, + { + "name": { + "name": { + "originalName": "usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "wireValue": "usage" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "units", + "camelCase": { + "unsafeName": "units", + "safeName": "units" + }, + "snakeCase": { + "unsafeName": "units", + "safeName": "units" + }, + "screamingSnakeCase": { + "unsafeName": "UNITS", + "safeName": "UNITS" + }, + "pascalCase": { + "unsafeName": "Units", + "safeName": "Units" + } + }, + "wireValue": "units" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + } + } + ] + }, + "typeName": { + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage" + } + }, + "jsonExample": { + "units": 1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Usage", + "camelCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "snakeCase": { + "unsafeName": "usage", + "safeName": "usage" + }, + "screamingSnakeCase": { + "unsafeName": "USAGE", + "safeName": "USAGE" + }, + "pascalCase": { + "unsafeName": "Usage", + "safeName": "Usage" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Usage", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "units": 1 + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "QueryResponse", + "camelCase": { + "unsafeName": "queryResponse", + "safeName": "queryResponse" + }, + "snakeCase": { + "unsafeName": "query_response", + "safeName": "query_response" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY_RESPONSE", + "safeName": "QUERY_RESPONSE" + }, + "pascalCase": { + "unsafeName": "QueryResponse", + "safeName": "QueryResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:QueryResponse" + } + }, + "jsonExample": { + "results": [ + { + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ], + "namespace": "namespace" + }, + { + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": {}, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ], + "namespace": "namespace" + } + ], + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + }, + { + "id": "id", + "score": 1.1, + "values": [ + 1.1, + 1.1 + ], + "metadata": { + "metadata": 1.1 + }, + "indexedData": { + "indices": [ + 1, + 1 + ], + "values": [ + 1.1, + 1.1 + ] + } + } + ], + "namespace": "namespace", + "usage": { + "units": 1 + } + } + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "availability": null, + "docs": null + }, + { + "id": "endpoint_dataservice.update", + "name": { + "originalName": "update", + "camelCase": { + "unsafeName": "update", + "safeName": "update" + }, + "snakeCase": { + "unsafeName": "update", + "safeName": "update" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE", + "safeName": "UPDATE" + }, + "pascalCase": { + "unsafeName": "Update", + "safeName": "Update" + } + }, + "displayName": null, + "auth": false, + "idempotent": false, + "baseUrl": null, + "method": "POST", + "basePath": null, + "path": { + "head": "/data/update", + "parts": [] + }, + "fullPath": { + "head": "data/update", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "UpdateRequest", + "camelCase": { + "unsafeName": "updateRequest", + "safeName": "updateRequest" + }, + "snakeCase": { + "unsafeName": "update_request", + "safeName": "update_request" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE_REQUEST", + "safeName": "UPDATE_REQUEST" + }, + "pascalCase": { + "unsafeName": "UpdateRequest", + "safeName": "UpdateRequest" + } + }, + "extends": [], + "contentType": "application/json", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "setMetadata", + "camelCase": { + "unsafeName": "setMetadata", + "safeName": "setMetadata" + }, + "snakeCase": { + "unsafeName": "set_metadata", + "safeName": "set_metadata" + }, + "screamingSnakeCase": { + "unsafeName": "SET_METADATA", + "safeName": "SET_METADATA" + }, + "pascalCase": { + "unsafeName": "SetMetadata", + "safeName": "SetMetadata" + } + }, + "wireValue": "setMetadata" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [], + "docs": null + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "UpdateRequest", + "camelCase": { + "unsafeName": "updateRequest", + "safeName": "updateRequest" + }, + "snakeCase": { + "unsafeName": "update_request", + "safeName": "update_request" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE_REQUEST", + "safeName": "UPDATE_REQUEST" + }, + "pascalCase": { + "unsafeName": "UpdateRequest", + "safeName": "UpdateRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + }, + "streamParameter": null + }, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "name": { + "originalName": "UpdateResponse", + "camelCase": { + "unsafeName": "updateResponse", + "safeName": "updateResponse" + }, + "snakeCase": { + "unsafeName": "update_response", + "safeName": "update_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE_RESPONSE", + "safeName": "UPDATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UpdateResponse", + "safeName": "UpdateResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UpdateResponse", + "default": null, + "inline": null + }, + "docs": "OK" + } + }, + "status-code": null + }, + "errors": [], + "userSpecifiedExamples": [ + { + "example": { + "id": "8cd2e2a6167841ed1c2ad642e8f73dce3bae391787af26bd0ad57a15a1b23f23", + "name": null, + "url": "/data/update", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [], + "serviceHeaders": [], + "queryParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + }, + "originalTypeDeclaration": null + } + ], + "jsonExample": { + "id": "id" + } + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:UpdateResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "UpdateResponse", + "camelCase": { + "unsafeName": "updateResponse", + "safeName": "updateResponse" + }, + "snakeCase": { + "unsafeName": "update_response", + "safeName": "update_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE_RESPONSE", + "safeName": "UPDATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UpdateResponse", + "safeName": "UpdateResponse" + } + } + }, + "shape": { + "type": "object", + "properties": [] + } + }, + "jsonExample": {} + } + } + }, + "docs": null + }, + "codeSamples": null + } + ], + "autogeneratedExamples": [ + { + "example": { + "id": "a60801ad6d1eb8149b087880ce3a12cd9924870a", + "url": "/data/update", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "id" + } + } + }, + "jsonExample": "id" + } + }, + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "setMetadata", + "camelCase": { + "unsafeName": "setMetadata", + "safeName": "setMetadata" + }, + "snakeCase": { + "unsafeName": "set_metadata", + "safeName": "set_metadata" + }, + "screamingSnakeCase": { + "unsafeName": "SET_METADATA", + "safeName": "SET_METADATA" + }, + "pascalCase": { + "unsafeName": "SetMetadata", + "safeName": "SetMetadata" + } + }, + "wireValue": "setMetadata" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "namespace", + "camelCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "snakeCase": { + "unsafeName": "namespace", + "safeName": "namespace" + }, + "screamingSnakeCase": { + "unsafeName": "NAMESPACE", + "safeName": "NAMESPACE" + }, + "pascalCase": { + "unsafeName": "Namespace", + "safeName": "Namespace" + } + }, + "wireValue": "namespace" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "indexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "wireValue": "indexedData" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "IndexedData", + "camelCase": { + "unsafeName": "indexedData", + "safeName": "indexedData" + }, + "snakeCase": { + "unsafeName": "indexed_data", + "safeName": "indexed_data" + }, + "screamingSnakeCase": { + "unsafeName": "INDEXED_DATA", + "safeName": "INDEXED_DATA" + }, + "pascalCase": { + "unsafeName": "IndexedData", + "safeName": "IndexedData" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:IndexedData", + "default": null, + "inline": null + } + } + } + } + } + ], + "jsonExample": { + "id": "id" + } + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [] + }, + "typeName": { + "name": { + "originalName": "UpdateResponse", + "camelCase": { + "unsafeName": "updateResponse", + "safeName": "updateResponse" + }, + "snakeCase": { + "unsafeName": "update_response", + "safeName": "update_response" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATE_RESPONSE", + "safeName": "UPDATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "UpdateResponse", + "safeName": "UpdateResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UpdateResponse" + } + }, + "jsonExample": {} + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "availability": null, + "docs": null + } + ] + } + }, + "constants": { + "errorInstanceIdKey": { + "name": { + "originalName": "errorInstanceId", + "camelCase": { + "unsafeName": "errorInstanceID", + "safeName": "errorInstanceID" + }, + "snakeCase": { + "unsafeName": "error_instance_id", + "safeName": "error_instance_id" + }, + "screamingSnakeCase": { + "unsafeName": "ERROR_INSTANCE_ID", + "safeName": "ERROR_INSTANCE_ID" + }, + "pascalCase": { + "unsafeName": "ErrorInstanceID", + "safeName": "ErrorInstanceID" + } + }, + "wireValue": "errorInstanceId" + } + }, + "environments": { + "defaultEnvironment": "Default", + "environments": { + "type": "singleBaseUrl", + "environments": [ + { + "id": "Default", + "name": { + "originalName": "Default", + "camelCase": { + "unsafeName": "default", + "safeName": "default" + }, + "snakeCase": { + "unsafeName": "default", + "safeName": "default" + }, + "screamingSnakeCase": { + "unsafeName": "DEFAULT", + "safeName": "DEFAULT" + }, + "pascalCase": { + "unsafeName": "Default", + "safeName": "Default" + } + }, + "url": "https://localhost", + "docs": null + } + ] + } + }, + "errorDiscriminationStrategy": { + "type": "statusCode" + }, + "basePath": null, + "pathParameters": [], + "variables": [], + "serviceTypeReferenceInfo": { + "typesReferencedOnlyByService": {}, + "sharedTypes": [ + "type_:Column", + "type_:UploadResponse", + "type_:Metadata", + "type_:DeleteResponse", + "type_:DescribeResponse", + "type_:FetchResponse", + "type_:ListResponse", + "type_:QueryColumn", + "type_:IndexedData", + "type_:QueryResponse", + "type_:UpdateResponse", + "type_:ListElement", + "type_:NamespaceSummary", + "type_:Pagination", + "type_:QueryResult", + "type_:ScoredColumn", + "type_:Usage", + "type_:MetadataValue" + ] + }, + "webhookGroups": {}, + "websocketChannels": {}, + "readmeConfig": null, + "sourceConfig": null, + "publishConfig": null, + "subpackages": { + "subpackage_dataservice": { + "name": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataservice", + "camelCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "snakeCase": { + "unsafeName": "dataservice", + "safeName": "dataservice" + }, + "screamingSnakeCase": { + "unsafeName": "DATASERVICE", + "safeName": "DATASERVICE" + }, + "pascalCase": { + "unsafeName": "Dataservice", + "safeName": "Dataservice" + } + } + }, + "service": "service_dataservice", + "types": [], + "errors": [], + "subpackages": [], + "navigationConfig": null, + "webhooks": null, + "websocket": null, + "hasEndpointsInTree": true, + "docs": null + } + }, + "rootPackage": { + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "websocket": null, + "service": null, + "types": [ + "type_:Column", + "type_:DeleteResponse", + "type_:DescribeResponse", + "type_:FetchResponse", + "type_:IndexedData", + "type_:ListElement", + "type_:ListResponse", + "type_:NamespaceSummary", + "type_:Pagination", + "type_:QueryColumn", + "type_:QueryResponse", + "type_:QueryResult", + "type_:ScoredColumn", + "type_:UpdateResponse", + "type_:UploadResponse", + "type_:Usage", + "type_:Metadata", + "type_:MetadataValue" + ], + "errors": [], + "subpackages": [ + "subpackage_dataservice" + ], + "webhooks": null, + "navigationConfig": null, + "hasEndpointsInTree": true, + "docs": null + }, + "sdkConfig": { + "isAuthMandatory": false, + "hasStreamingEndpoints": false, + "hasPaginatedEndpoints": false, + "hasFileDownloadEndpoints": false, + "platformHeaders": { + "language": "X-Fern-Language", + "sdkName": "X-Fern-SDK-Name", + "sdkVersion": "X-Fern-SDK-Version", + "userAgent": null + } + } +} \ No newline at end of file diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/csharp-grpc-proto.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/csharp-grpc-proto.json new file mode 100644 index 00000000000..b49d8cbc684 --- /dev/null +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/csharp-grpc-proto.json @@ -0,0 +1,3173 @@ +{ + "fdrApiDefinitionId": null, + "apiVersion": null, + "apiName": { + "originalName": "api", + "camelCase": { + "unsafeName": "api", + "safeName": "api" + }, + "snakeCase": { + "unsafeName": "api", + "safeName": "api" + }, + "screamingSnakeCase": { + "unsafeName": "API", + "safeName": "API" + }, + "pascalCase": { + "unsafeName": "API", + "safeName": "API" + } + }, + "apiDisplayName": "\"\"", + "apiDocs": null, + "auth": { + "requirement": "ALL", + "schemes": [], + "docs": null + }, + "headers": [], + "idempotencyHeaders": [], + "types": { + "type_:CreateResponse": { + "inline": false, + "name": { + "name": { + "originalName": "CreateResponse", + "camelCase": { + "unsafeName": "createResponse", + "safeName": "createResponse" + }, + "snakeCase": { + "unsafeName": "create_response", + "safeName": "create_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_RESPONSE", + "safeName": "CREATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateResponse", + "safeName": "CreateResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:CreateResponse" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "user", + "camelCase": { + "unsafeName": "user", + "safeName": "user" + }, + "snakeCase": { + "unsafeName": "user", + "safeName": "user" + }, + "screamingSnakeCase": { + "unsafeName": "USER", + "safeName": "USER" + }, + "pascalCase": { + "unsafeName": "User", + "safeName": "User" + } + }, + "wireValue": "user" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UserModel", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [ + "type_:UserModel", + "type_:Metadata", + "type_:MetadataValue" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/user/v1/user.proto", + "packageName": "user.v1", + "options": { + "csharp": { + "namespace": "User.V1" + } + } + }, + "name": { + "originalName": "CreateResponse", + "camelCase": { + "unsafeName": "createResponse", + "safeName": "createResponse" + }, + "snakeCase": { + "unsafeName": "create_response", + "safeName": "create_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_RESPONSE", + "safeName": "CREATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateResponse", + "safeName": "CreateResponse" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:UserModel": { + "inline": false, + "name": { + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UserModel" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "username", + "camelCase": { + "unsafeName": "username", + "safeName": "username" + }, + "snakeCase": { + "unsafeName": "username", + "safeName": "username" + }, + "screamingSnakeCase": { + "unsafeName": "USERNAME", + "safeName": "USERNAME" + }, + "pascalCase": { + "unsafeName": "Username", + "safeName": "Username" + } + }, + "wireValue": "username" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "email", + "camelCase": { + "unsafeName": "email", + "safeName": "email" + }, + "snakeCase": { + "unsafeName": "email", + "safeName": "email" + }, + "screamingSnakeCase": { + "unsafeName": "EMAIL", + "safeName": "EMAIL" + }, + "pascalCase": { + "unsafeName": "Email", + "safeName": "Email" + } + }, + "wireValue": "email" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "age", + "camelCase": { + "unsafeName": "age", + "safeName": "age" + }, + "snakeCase": { + "unsafeName": "age", + "safeName": "age" + }, + "screamingSnakeCase": { + "unsafeName": "AGE", + "safeName": "AGE" + }, + "pascalCase": { + "unsafeName": "Age", + "safeName": "Age" + } + }, + "wireValue": "age" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "weight", + "camelCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "snakeCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "screamingSnakeCase": { + "unsafeName": "WEIGHT", + "safeName": "WEIGHT" + }, + "pascalCase": { + "unsafeName": "Weight", + "safeName": "Weight" + } + }, + "wireValue": "weight" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [ + "type_:Metadata", + "type_:MetadataValue" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/user/v1/user.proto", + "packageName": "user.v1", + "options": { + "csharp": { + "namespace": "User.V1" + } + } + }, + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:Metadata": { + "inline": false, + "name": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata" + }, + "shape": { + "_type": "undiscriminatedUnion", + "members": [ + { + "type": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "docs": null + }, + { + "type": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "unknown" + } + } + }, + "docs": null + } + ] + }, + "referencedTypes": [ + "type_:MetadataValue" + ], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "wellKnown", + "value": { + "type": "struct" + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + }, + "type_:MetadataValue": { + "inline": false, + "name": { + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue" + }, + "shape": { + "_type": "undiscriminatedUnion", + "members": [ + { + "type": { + "_type": "primitive", + "primitive": { + "v1": "DOUBLE", + "v2": { + "type": "double", + "default": null, + "validation": null + } + } + }, + "docs": null + }, + { + "type": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "docs": null + }, + { + "type": { + "_type": "primitive", + "primitive": { + "v1": "BOOLEAN", + "v2": null + } + }, + "docs": null + } + ] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "wellKnown", + "value": { + "type": "value" + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "availability": null, + "docs": null + } + }, + "errors": {}, + "services": { + "service_userservice": { + "availability": null, + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "userservice", + "camelCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "snakeCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "screamingSnakeCase": { + "unsafeName": "USERSERVICE", + "safeName": "USERSERVICE" + }, + "pascalCase": { + "unsafeName": "Userservice", + "safeName": "Userservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "userservice", + "camelCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "snakeCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "screamingSnakeCase": { + "unsafeName": "USERSERVICE", + "safeName": "USERSERVICE" + }, + "pascalCase": { + "unsafeName": "Userservice", + "safeName": "Userservice" + } + } + } + }, + "displayName": "UserService", + "basePath": { + "head": "", + "parts": [] + }, + "headers": [], + "pathParameters": [], + "encoding": { + "json": null, + "proto": {} + }, + "transport": { + "type": "grpc", + "service": { + "file": { + "filepath": "proto/user/v1/user.proto", + "packageName": "user.v1", + "options": { + "csharp": { + "namespace": "User.V1" + } + } + }, + "name": { + "originalName": "UserService", + "camelCase": { + "unsafeName": "userService", + "safeName": "userService" + }, + "snakeCase": { + "unsafeName": "user_service", + "safeName": "user_service" + }, + "screamingSnakeCase": { + "unsafeName": "USER_SERVICE", + "safeName": "USER_SERVICE" + }, + "pascalCase": { + "unsafeName": "UserService", + "safeName": "UserService" + } + } + } + }, + "endpoints": [ + { + "id": "endpoint_userservice.create", + "name": { + "originalName": "create", + "camelCase": { + "unsafeName": "create", + "safeName": "create" + }, + "snakeCase": { + "unsafeName": "create", + "safeName": "create" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE", + "safeName": "CREATE" + }, + "pascalCase": { + "unsafeName": "Create", + "safeName": "Create" + } + }, + "displayName": null, + "auth": false, + "idempotent": false, + "baseUrl": null, + "method": "POST", + "basePath": null, + "path": { + "head": "/users", + "parts": [] + }, + "fullPath": { + "head": "users", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "CreateRequest", + "camelCase": { + "unsafeName": "createRequest", + "safeName": "createRequest" + }, + "snakeCase": { + "unsafeName": "create_request", + "safeName": "create_request" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_REQUEST", + "safeName": "CREATE_REQUEST" + }, + "pascalCase": { + "unsafeName": "CreateRequest", + "safeName": "CreateRequest" + } + }, + "extends": [], + "contentType": "application/json", + "properties": [ + { + "name": { + "name": { + "originalName": "username", + "camelCase": { + "unsafeName": "username", + "safeName": "username" + }, + "snakeCase": { + "unsafeName": "username", + "safeName": "username" + }, + "screamingSnakeCase": { + "unsafeName": "USERNAME", + "safeName": "USERNAME" + }, + "pascalCase": { + "unsafeName": "Username", + "safeName": "Username" + } + }, + "wireValue": "username" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "email", + "camelCase": { + "unsafeName": "email", + "safeName": "email" + }, + "snakeCase": { + "unsafeName": "email", + "safeName": "email" + }, + "screamingSnakeCase": { + "unsafeName": "EMAIL", + "safeName": "EMAIL" + }, + "pascalCase": { + "unsafeName": "Email", + "safeName": "Email" + } + }, + "wireValue": "email" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "age", + "camelCase": { + "unsafeName": "age", + "safeName": "age" + }, + "snakeCase": { + "unsafeName": "age", + "safeName": "age" + }, + "screamingSnakeCase": { + "unsafeName": "AGE", + "safeName": "AGE" + }, + "pascalCase": { + "unsafeName": "Age", + "safeName": "Age" + } + }, + "wireValue": "age" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "weight", + "camelCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "snakeCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "screamingSnakeCase": { + "unsafeName": "WEIGHT", + "safeName": "WEIGHT" + }, + "pascalCase": { + "unsafeName": "Weight", + "safeName": "Weight" + } + }, + "wireValue": "weight" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [], + "docs": null + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "CreateRequest", + "camelCase": { + "unsafeName": "createRequest", + "safeName": "createRequest" + }, + "snakeCase": { + "unsafeName": "create_request", + "safeName": "create_request" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_REQUEST", + "safeName": "CREATE_REQUEST" + }, + "pascalCase": { + "unsafeName": "CreateRequest", + "safeName": "CreateRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + }, + "streamParameter": null + }, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "name": { + "originalName": "CreateResponse", + "camelCase": { + "unsafeName": "createResponse", + "safeName": "createResponse" + }, + "snakeCase": { + "unsafeName": "create_response", + "safeName": "create_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_RESPONSE", + "safeName": "CREATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateResponse", + "safeName": "CreateResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:CreateResponse", + "default": null, + "inline": null + }, + "docs": "OK" + } + }, + "status-code": null + }, + "errors": [], + "userSpecifiedExamples": [ + { + "example": { + "id": "55d86fecae28100aa2552944eb8f0a02074a17fedc942c648d9e7067d385c8b3", + "name": null, + "url": "/users", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [], + "serviceHeaders": [], + "queryParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [], + "jsonExample": {} + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:CreateResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "CreateResponse", + "camelCase": { + "unsafeName": "createResponse", + "safeName": "createResponse" + }, + "snakeCase": { + "unsafeName": "create_response", + "safeName": "create_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_RESPONSE", + "safeName": "CREATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateResponse", + "safeName": "CreateResponse" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "user", + "camelCase": { + "unsafeName": "user", + "safeName": "user" + }, + "snakeCase": { + "unsafeName": "user", + "safeName": "user" + }, + "screamingSnakeCase": { + "unsafeName": "USER", + "safeName": "USER" + }, + "pascalCase": { + "unsafeName": "User", + "safeName": "User" + } + }, + "wireValue": "user" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:UserModel", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + } + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "username", + "camelCase": { + "unsafeName": "username", + "safeName": "username" + }, + "snakeCase": { + "unsafeName": "username", + "safeName": "username" + }, + "screamingSnakeCase": { + "unsafeName": "USERNAME", + "safeName": "USERNAME" + }, + "pascalCase": { + "unsafeName": "Username", + "safeName": "Username" + } + }, + "wireValue": "username" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "username" + } + } + }, + "jsonExample": "username" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "username" + }, + "originalTypeDeclaration": { + "typeId": "type_:UserModel", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + } + } + }, + { + "name": { + "name": { + "originalName": "email", + "camelCase": { + "unsafeName": "email", + "safeName": "email" + }, + "snakeCase": { + "unsafeName": "email", + "safeName": "email" + }, + "screamingSnakeCase": { + "unsafeName": "EMAIL", + "safeName": "EMAIL" + }, + "pascalCase": { + "unsafeName": "Email", + "safeName": "Email" + } + }, + "wireValue": "email" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "email" + } + } + }, + "jsonExample": "email" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "email" + }, + "originalTypeDeclaration": { + "typeId": "type_:UserModel", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + } + } + }, + { + "name": { + "name": { + "originalName": "age", + "camelCase": { + "unsafeName": "age", + "safeName": "age" + }, + "snakeCase": { + "unsafeName": "age", + "safeName": "age" + }, + "screamingSnakeCase": { + "unsafeName": "AGE", + "safeName": "AGE" + }, + "pascalCase": { + "unsafeName": "Age", + "safeName": "Age" + } + }, + "wireValue": "age" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + }, + "originalTypeDeclaration": { + "typeId": "type_:UserModel", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + } + } + }, + { + "name": { + "name": { + "originalName": "weight", + "camelCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "snakeCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "screamingSnakeCase": { + "unsafeName": "WEIGHT", + "safeName": "WEIGHT" + }, + "pascalCase": { + "unsafeName": "Weight", + "safeName": "Weight" + } + }, + "wireValue": "weight" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + }, + "originalTypeDeclaration": { + "typeId": "type_:UserModel", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + } + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:Metadata", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + } + }, + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "key" + } + } + }, + "jsonExample": "key" + }, + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:MetadataValue", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + } + }, + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "primitive", + "primitive": { + "type": "double", + "double": 1.1 + } + }, + "jsonExample": 1.1 + } + } + }, + "jsonExample": 1.1 + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "key": 1.1 + } + } + } + }, + "jsonExample": { + "key": 1.1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "key": 1.1 + } + }, + "originalTypeDeclaration": { + "typeId": "type_:UserModel", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + } + } + } + ] + } + }, + "jsonExample": { + "username": "username", + "email": "email", + "age": 1, + "weight": 1.1, + "metadata": { + "key": 1.1 + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UserModel", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "username": "username", + "email": "email", + "age": 1, + "weight": 1.1, + "metadata": { + "key": 1.1 + } + } + }, + "originalTypeDeclaration": { + "typeId": "type_:CreateResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "CreateResponse", + "camelCase": { + "unsafeName": "createResponse", + "safeName": "createResponse" + }, + "snakeCase": { + "unsafeName": "create_response", + "safeName": "create_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_RESPONSE", + "safeName": "CREATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateResponse", + "safeName": "CreateResponse" + } + } + } + } + ] + } + }, + "jsonExample": { + "user": { + "username": "username", + "email": "email", + "age": 1, + "weight": 1.1, + "metadata": { + "key": 1.1 + } + } + } + } + } + }, + "docs": null + }, + "codeSamples": null + } + ], + "autogeneratedExamples": [ + { + "example": { + "id": "964213a4ad5650f54a396923501cd6a2e03b674f", + "url": "/users", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": { + "type": "inlinedRequestBody", + "properties": [ + { + "name": { + "name": { + "originalName": "username", + "camelCase": { + "unsafeName": "username", + "safeName": "username" + }, + "snakeCase": { + "unsafeName": "username", + "safeName": "username" + }, + "screamingSnakeCase": { + "unsafeName": "USERNAME", + "safeName": "USERNAME" + }, + "pascalCase": { + "unsafeName": "Username", + "safeName": "Username" + } + }, + "wireValue": "username" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "email", + "camelCase": { + "unsafeName": "email", + "safeName": "email" + }, + "snakeCase": { + "unsafeName": "email", + "safeName": "email" + }, + "screamingSnakeCase": { + "unsafeName": "EMAIL", + "safeName": "EMAIL" + }, + "pascalCase": { + "unsafeName": "Email", + "safeName": "Email" + } + }, + "wireValue": "email" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "age", + "camelCase": { + "unsafeName": "age", + "safeName": "age" + }, + "snakeCase": { + "unsafeName": "age", + "safeName": "age" + }, + "screamingSnakeCase": { + "unsafeName": "AGE", + "safeName": "AGE" + }, + "pascalCase": { + "unsafeName": "Age", + "safeName": "Age" + } + }, + "wireValue": "age" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "weight", + "camelCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "snakeCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "screamingSnakeCase": { + "unsafeName": "WEIGHT", + "safeName": "WEIGHT" + }, + "pascalCase": { + "unsafeName": "Weight", + "safeName": "Weight" + } + }, + "wireValue": "weight" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + } + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": null, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + } + } + } + ], + "jsonExample": {} + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "user", + "camelCase": { + "unsafeName": "user", + "safeName": "user" + }, + "snakeCase": { + "unsafeName": "user", + "safeName": "user" + }, + "screamingSnakeCase": { + "unsafeName": "USER", + "safeName": "USER" + }, + "pascalCase": { + "unsafeName": "User", + "safeName": "User" + } + }, + "wireValue": "user" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "CreateResponse", + "camelCase": { + "unsafeName": "createResponse", + "safeName": "createResponse" + }, + "snakeCase": { + "unsafeName": "create_response", + "safeName": "create_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_RESPONSE", + "safeName": "CREATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateResponse", + "safeName": "CreateResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:CreateResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "username", + "camelCase": { + "unsafeName": "username", + "safeName": "username" + }, + "snakeCase": { + "unsafeName": "username", + "safeName": "username" + }, + "screamingSnakeCase": { + "unsafeName": "USERNAME", + "safeName": "USERNAME" + }, + "pascalCase": { + "unsafeName": "Username", + "safeName": "Username" + } + }, + "wireValue": "username" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UserModel" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "username" + } + } + }, + "jsonExample": "username" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "username" + } + }, + { + "name": { + "name": { + "originalName": "email", + "camelCase": { + "unsafeName": "email", + "safeName": "email" + }, + "snakeCase": { + "unsafeName": "email", + "safeName": "email" + }, + "screamingSnakeCase": { + "unsafeName": "EMAIL", + "safeName": "EMAIL" + }, + "pascalCase": { + "unsafeName": "Email", + "safeName": "Email" + } + }, + "wireValue": "email" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UserModel" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "email" + } + } + }, + "jsonExample": "email" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "email" + } + }, + { + "name": { + "name": { + "originalName": "age", + "camelCase": { + "unsafeName": "age", + "safeName": "age" + }, + "snakeCase": { + "unsafeName": "age", + "safeName": "age" + }, + "screamingSnakeCase": { + "unsafeName": "AGE", + "safeName": "AGE" + }, + "pascalCase": { + "unsafeName": "Age", + "safeName": "Age" + } + }, + "wireValue": "age" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UserModel" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "uint", + "uint": 1 + } + }, + "jsonExample": 1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "UINT", + "v2": null + } + } + } + }, + "jsonExample": 1 + } + }, + { + "name": { + "name": { + "originalName": "weight", + "camelCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "snakeCase": { + "unsafeName": "weight", + "safeName": "weight" + }, + "screamingSnakeCase": { + "unsafeName": "WEIGHT", + "safeName": "WEIGHT" + }, + "pascalCase": { + "unsafeName": "Weight", + "safeName": "Weight" + } + }, + "wireValue": "weight" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UserModel" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "float", + "float": 1.1 + } + }, + "jsonExample": 1.1 + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "FLOAT", + "v2": null + } + } + } + }, + "jsonExample": 1.1 + } + }, + { + "name": { + "name": { + "originalName": "metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "wireValue": "metadata" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UserModel" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "metadata" + } + } + }, + "jsonExample": "metadata" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "undiscriminatedUnion", + "index": 0, + "singleUnionType": { + "shape": { + "type": "primitive", + "primitive": { + "type": "double", + "double": 1.1 + } + }, + "jsonExample": 1.1 + } + }, + "typeName": { + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue" + } + }, + "jsonExample": 1.1 + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "MetadataValue", + "camelCase": { + "unsafeName": "metadataValue", + "safeName": "metadataValue" + }, + "snakeCase": { + "unsafeName": "metadata_value", + "safeName": "metadata_value" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA_VALUE", + "safeName": "METADATA_VALUE" + }, + "pascalCase": { + "unsafeName": "MetadataValue", + "safeName": "MetadataValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:MetadataValue", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "metadata": 1.1 + } + } + }, + "typeName": { + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata" + } + }, + "jsonExample": { + "metadata": 1.1 + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Metadata", + "camelCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "snakeCase": { + "unsafeName": "metadata", + "safeName": "metadata" + }, + "screamingSnakeCase": { + "unsafeName": "METADATA", + "safeName": "METADATA" + }, + "pascalCase": { + "unsafeName": "Metadata", + "safeName": "Metadata" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:Metadata", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "metadata": 1.1 + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UserModel" + } + }, + "jsonExample": { + "username": "username", + "email": "email", + "age": 1, + "weight": 1.1, + "metadata": { + "metadata": 1.1 + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "UserModel", + "camelCase": { + "unsafeName": "userModel", + "safeName": "userModel" + }, + "snakeCase": { + "unsafeName": "user_model", + "safeName": "user_model" + }, + "screamingSnakeCase": { + "unsafeName": "USER_MODEL", + "safeName": "USER_MODEL" + }, + "pascalCase": { + "unsafeName": "UserModel", + "safeName": "UserModel" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:UserModel", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "username": "username", + "email": "email", + "age": 1, + "weight": 1.1, + "metadata": { + "metadata": 1.1 + } + } + } + } + ] + }, + "typeName": { + "name": { + "originalName": "CreateResponse", + "camelCase": { + "unsafeName": "createResponse", + "safeName": "createResponse" + }, + "snakeCase": { + "unsafeName": "create_response", + "safeName": "create_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_RESPONSE", + "safeName": "CREATE_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateResponse", + "safeName": "CreateResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "typeId": "type_:CreateResponse" + } + }, + "jsonExample": { + "user": { + "username": "username", + "email": "email", + "age": 1, + "weight": 1.1, + "metadata": { + "metadata": 1.1 + } + } + } + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "availability": null, + "docs": null + } + ] + } + }, + "constants": { + "errorInstanceIdKey": { + "name": { + "originalName": "errorInstanceId", + "camelCase": { + "unsafeName": "errorInstanceID", + "safeName": "errorInstanceID" + }, + "snakeCase": { + "unsafeName": "error_instance_id", + "safeName": "error_instance_id" + }, + "screamingSnakeCase": { + "unsafeName": "ERROR_INSTANCE_ID", + "safeName": "ERROR_INSTANCE_ID" + }, + "pascalCase": { + "unsafeName": "ErrorInstanceID", + "safeName": "ErrorInstanceID" + } + }, + "wireValue": "errorInstanceId" + } + }, + "environments": null, + "errorDiscriminationStrategy": { + "type": "statusCode" + }, + "basePath": null, + "pathParameters": [], + "variables": [], + "serviceTypeReferenceInfo": { + "typesReferencedOnlyByService": {}, + "sharedTypes": [ + "type_:Metadata", + "type_:CreateResponse", + "type_:UserModel", + "type_:MetadataValue" + ] + }, + "webhookGroups": {}, + "websocketChannels": {}, + "readmeConfig": null, + "sourceConfig": null, + "publishConfig": null, + "subpackages": { + "subpackage_userservice": { + "name": { + "originalName": "userservice", + "camelCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "snakeCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "screamingSnakeCase": { + "unsafeName": "USERSERVICE", + "safeName": "USERSERVICE" + }, + "pascalCase": { + "unsafeName": "Userservice", + "safeName": "Userservice" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "userservice", + "camelCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "snakeCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "screamingSnakeCase": { + "unsafeName": "USERSERVICE", + "safeName": "USERSERVICE" + }, + "pascalCase": { + "unsafeName": "Userservice", + "safeName": "Userservice" + } + } + ], + "packagePath": [], + "file": { + "originalName": "userservice", + "camelCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "snakeCase": { + "unsafeName": "userservice", + "safeName": "userservice" + }, + "screamingSnakeCase": { + "unsafeName": "USERSERVICE", + "safeName": "USERSERVICE" + }, + "pascalCase": { + "unsafeName": "Userservice", + "safeName": "Userservice" + } + } + }, + "service": "service_userservice", + "types": [], + "errors": [], + "subpackages": [], + "navigationConfig": null, + "webhooks": null, + "websocket": null, + "hasEndpointsInTree": true, + "docs": null + } + }, + "rootPackage": { + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "websocket": null, + "service": null, + "types": [ + "type_:CreateResponse", + "type_:UserModel", + "type_:Metadata", + "type_:MetadataValue" + ], + "errors": [], + "subpackages": [ + "subpackage_userservice" + ], + "webhooks": null, + "navigationConfig": null, + "hasEndpointsInTree": true, + "docs": null + }, + "sdkConfig": { + "isAuthMandatory": false, + "hasStreamingEndpoints": false, + "hasPaginatedEndpoints": false, + "hasFileDownloadEndpoints": false, + "platformHeaders": { + "language": "X-Fern-Language", + "sdkName": "X-Fern-SDK-Name", + "sdkVersion": "X-Fern-SDK-Version", + "userAgent": null + } + } +} \ No newline at end of file diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json new file mode 100644 index 00000000000..86c8f3a7075 --- /dev/null +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json @@ -0,0 +1,1821 @@ +{ + "types": { + "type_:Column": { + "name": "Column", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "id", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "key": "values", + "valueType": { + "type": "list", + "itemType": { + "type": "primitive", + "value": { + "type": "double", + "minimum": 2.2250738585072014e-308, + "maximum": 1.7976931348623157e+308, + "default": 0 + } + } + } + }, + { + "key": "metadata", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Metadata" + } + } + }, + { + "key": "indexedData", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:IndexedData" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:DeleteResponse": { + "name": "DeleteResponse", + "shape": { + "type": "object", + "extends": [], + "properties": [], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:DescribeResponse": { + "name": "DescribeResponse", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "namespaces", + "valueType": { + "type": "optional", + "itemType": { + "type": "map", + "keyType": { + "type": "primitive", + "value": { + "type": "string" + } + }, + "valueType": { + "type": "id", + "value": "type_:NamespaceSummary" + } + } + } + }, + { + "key": "dimension", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + } + }, + { + "key": "fullness", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "double", + "minimum": 2.2250738585072014e-308, + "maximum": 1.7976931348623157e+308, + "default": 0 + } + } + } + }, + { + "key": "totalCount", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:FetchResponse": { + "name": "FetchResponse", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "columns", + "valueType": { + "type": "optional", + "itemType": { + "type": "map", + "keyType": { + "type": "primitive", + "value": { + "type": "string" + } + }, + "valueType": { + "type": "id", + "value": "type_:Column" + } + } + } + }, + { + "key": "namespace", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "usage", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Usage" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:IndexedData": { + "name": "IndexedData", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "indices", + "valueType": { + "type": "list", + "itemType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + } + }, + { + "key": "values", + "valueType": { + "type": "list", + "itemType": { + "type": "primitive", + "value": { + "type": "double", + "minimum": 2.2250738585072014e-308, + "maximum": 1.7976931348623157e+308, + "default": 0 + } + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:ListElement": { + "name": "ListElement", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "id", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:ListResponse": { + "name": "ListResponse", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "columns", + "valueType": { + "type": "optional", + "itemType": { + "type": "list", + "itemType": { + "type": "id", + "value": "type_:ListElement" + } + } + } + }, + { + "key": "pagination", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Pagination" + } + } + }, + { + "key": "namespace", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "usage", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Usage" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:NamespaceSummary": { + "name": "NamespaceSummary", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "count", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:Pagination": { + "name": "Pagination", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "next", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:QueryColumn": { + "name": "QueryColumn", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "values", + "valueType": { + "type": "list", + "itemType": { + "type": "primitive", + "value": { + "type": "double", + "minimum": 2.2250738585072014e-308, + "maximum": 1.7976931348623157e+308, + "default": 0 + } + } + } + }, + { + "key": "topK", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + } + }, + { + "key": "namespace", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "filter", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Metadata" + } + } + }, + { + "key": "indexedData", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:IndexedData" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:QueryResponse": { + "name": "QueryResponse", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "results", + "valueType": { + "type": "optional", + "itemType": { + "type": "list", + "itemType": { + "type": "id", + "value": "type_:QueryResult" + } + } + } + }, + { + "key": "matches", + "valueType": { + "type": "optional", + "itemType": { + "type": "list", + "itemType": { + "type": "id", + "value": "type_:ScoredColumn" + } + } + } + }, + { + "key": "namespace", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "usage", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Usage" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:QueryResult": { + "name": "QueryResult", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "matches", + "valueType": { + "type": "optional", + "itemType": { + "type": "list", + "itemType": { + "type": "id", + "value": "type_:ScoredColumn" + } + } + } + }, + { + "key": "namespace", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:ScoredColumn": { + "name": "ScoredColumn", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "id", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "key": "score", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "double", + "minimum": 2.2250738585072014e-308, + "maximum": 1.7976931348623157e+308, + "default": 0 + } + } + } + }, + { + "key": "values", + "valueType": { + "type": "optional", + "itemType": { + "type": "list", + "itemType": { + "type": "primitive", + "value": { + "type": "double", + "minimum": 2.2250738585072014e-308, + "maximum": 1.7976931348623157e+308, + "default": 0 + } + } + } + } + }, + { + "key": "metadata", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Metadata" + } + } + }, + { + "key": "indexedData", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:IndexedData" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UpdateResponse": { + "name": "UpdateResponse", + "shape": { + "type": "object", + "extends": [], + "properties": [], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UploadResponse": { + "name": "UploadResponse", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "count", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:Usage": { + "name": "Usage", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "units", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:Metadata": { + "name": "Metadata", + "shape": { + "type": "undiscriminatedUnion", + "variants": [ + { + "type": { + "type": "map", + "keyType": { + "type": "primitive", + "value": { + "type": "string" + } + }, + "valueType": { + "type": "id", + "value": "type_:MetadataValue" + } + } + }, + { + "type": { + "type": "map", + "keyType": { + "type": "primitive", + "value": { + "type": "string" + } + }, + "valueType": { + "type": "unknown" + } + } + } + ] + } + }, + "type_:MetadataValue": { + "name": "MetadataValue", + "shape": { + "type": "undiscriminatedUnion", + "variants": [ + { + "type": { + "type": "primitive", + "value": { + "type": "double" + } + } + }, + { + "type": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "type": { + "type": "primitive", + "value": { + "type": "boolean", + "default": false + } + } + } + ] + } + } + }, + "subpackages": { + "subpackage_dataservice": { + "subpackageId": "subpackage_dataservice", + "displayName": "DataService", + "name": "dataservice", + "endpoints": [ + { + "auth": false, + "method": "POST", + "defaultEnvironment": "Default", + "environments": [ + { + "id": "Default", + "baseUrl": "https://localhost" + } + ], + "id": "foo", + "originalEndpointId": "endpoint_dataservice.foo", + "name": "Foo", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "" + }, + { + "type": "literal", + "value": "/foo" + } + ] + }, + "queryParameters": [], + "headers": [], + "response": { + "type": { + "type": "reference", + "value": { + "type": "map", + "keyType": { + "type": "primitive", + "value": { + "type": "string" + } + }, + "valueType": { + "type": "unknown" + } + } + } + }, + "errorsV2": [], + "examples": [ + { + "path": "/foo", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "responseStatusCode": 200, + "responseBody": { + "key": "value" + }, + "responseBodyV3": { + "type": "json", + "value": { + "key": "value" + } + } + } + ] + }, + { + "auth": false, + "method": "POST", + "defaultEnvironment": "Default", + "environments": [ + { + "id": "Default", + "baseUrl": "https://localhost" + } + ], + "id": "upload", + "originalEndpointId": "endpoint_dataservice.upload", + "name": "Upload", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "" + }, + { + "type": "literal", + "value": "/data" + } + ] + }, + "queryParameters": [], + "headers": [], + "request": { + "type": { + "type": "json", + "contentType": "application/json", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "columns", + "valueType": { + "type": "list", + "itemType": { + "type": "id", + "value": "type_:Column" + } + } + }, + { + "key": "namespace", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + } + ] + } + } + }, + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_:UploadResponse" + } + }, + "description": "OK" + }, + "errorsV2": [], + "examples": [ + { + "path": "/data", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": { + "columns": [ + { + "id": "id", + "values": [ + 1.1 + ] + } + ] + }, + "requestBodyV3": { + "type": "json", + "value": { + "columns": [ + { + "id": "id", + "values": [ + 1.1 + ] + } + ] + } + }, + "responseStatusCode": 200, + "responseBody": { + "count": 1 + }, + "responseBodyV3": { + "type": "json", + "value": { + "count": 1 + } + } + } + ] + }, + { + "auth": false, + "method": "POST", + "defaultEnvironment": "Default", + "environments": [ + { + "id": "Default", + "baseUrl": "https://localhost" + } + ], + "id": "delete", + "originalEndpointId": "endpoint_dataservice.delete", + "name": "Delete", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "" + }, + { + "type": "literal", + "value": "/data/delete" + } + ] + }, + "queryParameters": [], + "headers": [], + "request": { + "type": { + "type": "json", + "contentType": "application/json", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "ids", + "valueType": { + "type": "optional", + "itemType": { + "type": "list", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + } + }, + { + "key": "deleteAll", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "boolean", + "default": false + } + } + } + }, + { + "key": "namespace", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "filter", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Metadata" + } + } + } + ] + } + } + }, + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_:DeleteResponse" + } + }, + "description": "OK" + }, + "errorsV2": [], + "examples": [ + { + "path": "/data/delete", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": {}, + "requestBodyV3": { + "type": "json", + "value": {} + }, + "responseStatusCode": 200, + "responseBody": {}, + "responseBodyV3": { + "type": "json", + "value": {} + } + } + ] + }, + { + "auth": false, + "method": "POST", + "defaultEnvironment": "Default", + "environments": [ + { + "id": "Default", + "baseUrl": "https://localhost" + } + ], + "id": "describe", + "originalEndpointId": "endpoint_dataservice.describe", + "name": "Describe", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "" + }, + { + "type": "literal", + "value": "/data/describe" + } + ] + }, + "queryParameters": [], + "headers": [], + "request": { + "type": { + "type": "json", + "contentType": "application/json", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "filter", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Metadata" + } + } + } + ] + } + } + }, + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_:DescribeResponse" + } + }, + "description": "OK" + }, + "errorsV2": [], + "examples": [ + { + "path": "/data/describe", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": {}, + "requestBodyV3": { + "type": "json", + "value": {} + }, + "responseStatusCode": 200, + "responseBody": { + "namespaces": { + "key": { + "count": 1 + } + }, + "dimension": 1, + "fullness": 1.1, + "totalCount": 1 + }, + "responseBodyV3": { + "type": "json", + "value": { + "namespaces": { + "key": { + "count": 1 + } + }, + "dimension": 1, + "fullness": 1.1, + "totalCount": 1 + } + } + } + ] + }, + { + "auth": false, + "method": "GET", + "defaultEnvironment": "Default", + "environments": [ + { + "id": "Default", + "baseUrl": "https://localhost" + } + ], + "id": "fetch", + "originalEndpointId": "endpoint_dataservice.fetch", + "name": "Fetch", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "" + }, + { + "type": "literal", + "value": "/data/fetch" + } + ] + }, + "queryParameters": [ + { + "key": "ids", + "type": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "namespace", + "type": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + } + ], + "headers": [], + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_:FetchResponse" + } + }, + "description": "OK" + }, + "errorsV2": [], + "examples": [ + { + "path": "/data/fetch", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "responseStatusCode": 200, + "responseBody": { + "columns": { + "key": { + "id": "id", + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + }, + "namespace": "namespace", + "usage": { + "units": 1 + } + }, + "responseBodyV3": { + "type": "json", + "value": { + "columns": { + "key": { + "id": "id", + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + }, + "namespace": "namespace", + "usage": { + "units": 1 + } + } + } + } + ] + }, + { + "auth": false, + "method": "GET", + "defaultEnvironment": "Default", + "environments": [ + { + "id": "Default", + "baseUrl": "https://localhost" + } + ], + "id": "list", + "originalEndpointId": "endpoint_dataservice.list", + "name": "List", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "" + }, + { + "type": "literal", + "value": "/data/list" + } + ] + }, + "queryParameters": [ + { + "key": "prefix", + "type": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "limit", + "type": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + } + }, + { + "key": "paginationToken", + "type": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "namespace", + "type": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + } + ], + "headers": [], + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_:ListResponse" + } + }, + "description": "OK" + }, + "errorsV2": [], + "examples": [ + { + "path": "/data/list", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "responseStatusCode": 200, + "responseBody": { + "columns": [ + { + "id": "id" + } + ], + "pagination": { + "next": "next" + }, + "namespace": "namespace", + "usage": { + "units": 1 + } + }, + "responseBodyV3": { + "type": "json", + "value": { + "columns": [ + { + "id": "id" + } + ], + "pagination": { + "next": "next" + }, + "namespace": "namespace", + "usage": { + "units": 1 + } + } + } + } + ] + }, + { + "auth": false, + "method": "POST", + "defaultEnvironment": "Default", + "environments": [ + { + "id": "Default", + "baseUrl": "https://localhost" + } + ], + "id": "query", + "originalEndpointId": "endpoint_dataservice.query", + "name": "Query", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "" + }, + { + "type": "literal", + "value": "/data/query" + } + ] + }, + "queryParameters": [], + "headers": [], + "request": { + "type": { + "type": "json", + "contentType": "application/json", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "namespace", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "topK", + "valueType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + }, + { + "key": "filter", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Metadata" + } + } + }, + { + "key": "includeValues", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "boolean", + "default": false + } + } + } + }, + { + "key": "includeMetadata", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "boolean", + "default": false + } + } + } + }, + { + "key": "queries", + "valueType": { + "type": "optional", + "itemType": { + "type": "list", + "itemType": { + "type": "id", + "value": "type_:QueryColumn" + } + } + } + }, + { + "key": "column", + "valueType": { + "type": "optional", + "itemType": { + "type": "list", + "itemType": { + "type": "primitive", + "value": { + "type": "double", + "minimum": 2.2250738585072014e-308, + "maximum": 1.7976931348623157e+308, + "default": 0 + } + } + } + } + }, + { + "key": "id", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "indexedData", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:IndexedData" + } + } + } + ] + } + } + }, + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_:QueryResponse" + } + }, + "description": "OK" + }, + "errorsV2": [], + "examples": [ + { + "path": "/data/query", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": { + "topK": 1 + }, + "requestBodyV3": { + "type": "json", + "value": { + "topK": 1 + } + }, + "responseStatusCode": 200, + "responseBody": { + "results": [ + { + "matches": [ + { + "id": "id" + } + ], + "namespace": "namespace" + } + ], + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + ], + "namespace": "namespace", + "usage": { + "units": 1 + } + }, + "responseBodyV3": { + "type": "json", + "value": { + "results": [ + { + "matches": [ + { + "id": "id" + } + ], + "namespace": "namespace" + } + ], + "matches": [ + { + "id": "id", + "score": 1.1, + "values": [ + 1.1 + ], + "metadata": { + "key": 1.1 + }, + "indexedData": { + "indices": [ + 1 + ], + "values": [ + 1.1 + ] + } + } + ], + "namespace": "namespace", + "usage": { + "units": 1 + } + } + } + } + ] + }, + { + "auth": false, + "method": "POST", + "defaultEnvironment": "Default", + "environments": [ + { + "id": "Default", + "baseUrl": "https://localhost" + } + ], + "id": "update", + "originalEndpointId": "endpoint_dataservice.update", + "name": "Update", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "" + }, + { + "type": "literal", + "value": "/data/update" + } + ] + }, + "queryParameters": [], + "headers": [], + "request": { + "type": { + "type": "json", + "contentType": "application/json", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "id", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "key": "values", + "valueType": { + "type": "optional", + "itemType": { + "type": "list", + "itemType": { + "type": "primitive", + "value": { + "type": "double", + "minimum": 2.2250738585072014e-308, + "maximum": 1.7976931348623157e+308, + "default": 0 + } + } + } + } + }, + { + "key": "setMetadata", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Metadata" + } + } + }, + { + "key": "namespace", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "indexedData", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:IndexedData" + } + } + } + ] + } + } + }, + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_:UpdateResponse" + } + }, + "description": "OK" + }, + "errorsV2": [], + "examples": [ + { + "path": "/data/update", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": { + "id": "id" + }, + "requestBodyV3": { + "type": "json", + "value": { + "id": "id" + } + }, + "responseStatusCode": 200, + "responseBody": {}, + "responseBodyV3": { + "type": "json", + "value": {} + } + } + ] + } + ], + "webhooks": [], + "websockets": [], + "types": [], + "subpackages": [] + } + }, + "rootPackage": { + "endpoints": [], + "webhooks": [], + "websockets": [], + "types": [ + "type_:Column", + "type_:DeleteResponse", + "type_:DescribeResponse", + "type_:FetchResponse", + "type_:IndexedData", + "type_:ListElement", + "type_:ListResponse", + "type_:NamespaceSummary", + "type_:Pagination", + "type_:QueryColumn", + "type_:QueryResponse", + "type_:QueryResult", + "type_:ScoredColumn", + "type_:UpdateResponse", + "type_:UploadResponse", + "type_:Usage", + "type_:Metadata", + "type_:MetadataValue" + ], + "subpackages": [ + "subpackage_dataservice" + ] + }, + "snippetsConfiguration": {}, + "globalHeaders": [] +} \ No newline at end of file diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json new file mode 100644 index 00000000000..16a7d804025 --- /dev/null +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json @@ -0,0 +1,343 @@ +{ + "types": { + "type_:CreateResponse": { + "name": "CreateResponse", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "user", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:UserModel" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UserModel": { + "name": "UserModel", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "username", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "email", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "age", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + } + }, + { + "key": "weight", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "double", + "minimum": 2.2250738585072014e-308, + "maximum": 1.7976931348623157e+308, + "default": 0 + } + } + } + }, + { + "key": "metadata", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Metadata" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:Metadata": { + "name": "Metadata", + "shape": { + "type": "undiscriminatedUnion", + "variants": [ + { + "type": { + "type": "map", + "keyType": { + "type": "primitive", + "value": { + "type": "string" + } + }, + "valueType": { + "type": "id", + "value": "type_:MetadataValue" + } + } + }, + { + "type": { + "type": "map", + "keyType": { + "type": "primitive", + "value": { + "type": "string" + } + }, + "valueType": { + "type": "unknown" + } + } + } + ] + } + }, + "type_:MetadataValue": { + "name": "MetadataValue", + "shape": { + "type": "undiscriminatedUnion", + "variants": [ + { + "type": { + "type": "primitive", + "value": { + "type": "double" + } + } + }, + { + "type": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "type": { + "type": "primitive", + "value": { + "type": "boolean", + "default": false + } + } + } + ] + } + } + }, + "subpackages": { + "subpackage_userservice": { + "subpackageId": "subpackage_userservice", + "displayName": "UserService", + "name": "userservice", + "endpoints": [ + { + "auth": false, + "method": "POST", + "id": "create", + "originalEndpointId": "endpoint_userservice.create", + "name": "Create", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "" + }, + { + "type": "literal", + "value": "/users" + } + ] + }, + "queryParameters": [], + "headers": [], + "request": { + "type": { + "type": "json", + "contentType": "application/json", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "username", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "email", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + { + "key": "age", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "uint" + } + } + } + }, + { + "key": "weight", + "valueType": { + "type": "optional", + "itemType": { + "type": "primitive", + "value": { + "type": "double", + "minimum": 2.2250738585072014e-308, + "maximum": 1.7976931348623157e+308, + "default": 0 + } + } + } + }, + { + "key": "metadata", + "valueType": { + "type": "optional", + "itemType": { + "type": "id", + "value": "type_:Metadata" + } + } + } + ] + } + } + }, + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_:CreateResponse" + } + }, + "description": "OK" + }, + "errorsV2": [], + "examples": [ + { + "path": "/users", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": {}, + "requestBodyV3": { + "type": "json", + "value": {} + }, + "responseStatusCode": 200, + "responseBody": { + "user": { + "username": "username", + "email": "email", + "age": 1, + "weight": 1.1, + "metadata": { + "key": 1.1 + } + } + }, + "responseBodyV3": { + "type": "json", + "value": { + "user": { + "username": "username", + "email": "email", + "age": 1, + "weight": 1.1, + "metadata": { + "key": 1.1 + } + } + } + } + } + ] + } + ], + "webhooks": [], + "websockets": [], + "types": [], + "subpackages": [] + } + }, + "rootPackage": { + "endpoints": [], + "webhooks": [], + "websockets": [], + "types": [ + "type_:CreateResponse", + "type_:UserModel", + "type_:Metadata", + "type_:MetadataValue" + ], + "subpackages": [ + "subpackage_userservice" + ] + }, + "snippetsConfiguration": {}, + "globalHeaders": [] +} \ No newline at end of file diff --git a/seed/csharp-model/enum/forward-compatible-enums/.mock/definition/path-param.yml b/seed/csharp-model/enum/forward-compatible-enums/.mock/definition/path-param.yml index 7553551fdc2..5afc7329f1e 100644 --- a/seed/csharp-model/enum/forward-compatible-enums/.mock/definition/path-param.yml +++ b/seed/csharp-model/enum/forward-compatible-enums/.mock/definition/path-param.yml @@ -6,16 +6,12 @@ service: base-path: "" endpoints: send: - path: /path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor} + path: /path/{operand}/{operandOrColor} method: POST path-parameters: operand: root.Operand - maybeOperand: optional operandOrColor: root.ColorOrOperand - maybeOperandOrColor: optional examples: - path-parameters: operand: $root.Operand.GreaterThan - maybeOperand: $root.Operand.LessThan operandOrColor: $root.ColorOrOperand.Red - maybeOperandOrColor: $root.ColorOrOperand.Red \ No newline at end of file diff --git a/seed/csharp-model/enum/plain-enums/.mock/definition/path-param.yml b/seed/csharp-model/enum/plain-enums/.mock/definition/path-param.yml index 7553551fdc2..5afc7329f1e 100644 --- a/seed/csharp-model/enum/plain-enums/.mock/definition/path-param.yml +++ b/seed/csharp-model/enum/plain-enums/.mock/definition/path-param.yml @@ -6,16 +6,12 @@ service: base-path: "" endpoints: send: - path: /path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor} + path: /path/{operand}/{operandOrColor} method: POST path-parameters: operand: root.Operand - maybeOperand: optional operandOrColor: root.ColorOrOperand - maybeOperandOrColor: optional examples: - path-parameters: operand: $root.Operand.GreaterThan - maybeOperand: $root.Operand.LessThan operandOrColor: $root.ColorOrOperand.Red - maybeOperandOrColor: $root.ColorOrOperand.Red \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml +++ b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/test-definitions/fern/apis/grpc-proto-exhaustive/openapi/openapi.yml b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/openapi/openapi.yml similarity index 100% rename from test-definitions/fern/apis/grpc-proto-exhaustive/openapi/openapi.yml rename to seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/openapi/openapi.yml diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml +++ b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/openapi/openapi.yml b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/csharp-model/mixed-case/.mock/definition/service.yml b/seed/csharp-model/mixed-case/.mock/definition/service.yml index 5991572a42f..7a38e853c35 100644 --- a/seed/csharp-model/mixed-case/.mock/definition/service.yml +++ b/seed/csharp-model/mixed-case/.mock/definition/service.yml @@ -56,6 +56,7 @@ types: Organization: Organization examples: - value: + status: ACTIVE resource_type: user userName: username metadata_tags: @@ -80,6 +81,7 @@ service: ResourceID: "rsc-xyz" response: body: + status: ACTIVE resource_type: user userName: username metadata_tags: @@ -106,6 +108,7 @@ service: response: body: - resource_type: user + status: ACTIVE userName: username metadata_tags: - tag1 diff --git a/seed/csharp-sdk/any-auth/README.md b/seed/csharp-sdk/any-auth/README.md index 9f544807527..ee1d73a4bdc 100644 --- a/seed/csharp-sdk/any-auth/README.md +++ b/seed/csharp-sdk/any-auth/README.md @@ -26,7 +26,7 @@ await client.Auth.GetTokenAsync( ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", } ); ``` diff --git a/seed/csharp-sdk/any-auth/reference.md b/seed/csharp-sdk/any-auth/reference.md index cc89e89df47..49a3a94c9ff 100644 --- a/seed/csharp-sdk/any-auth/reference.md +++ b/seed/csharp-sdk/any-auth/reference.md @@ -20,7 +20,7 @@ await client.Auth.GetTokenAsync( ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", } ); ``` diff --git a/seed/csharp-sdk/any-auth/snippet.json b/seed/csharp-sdk/any-auth/snippet.json index cf98986297e..c9df0a2f89f 100644 --- a/seed/csharp-sdk/any-auth/snippet.json +++ b/seed/csharp-sdk/any-auth/snippet.json @@ -10,7 +10,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedAnyAuth;\n\nvar client = new SeedAnyAuthClient(\"TOKEN\");\nawait client.Auth.GetTokenAsync(\n new GetTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n Audience = \"https://api.example.com\",\n GrantType = \"client_credentials\",\n Scope = null,\n }\n);\n" + "client": "using SeedAnyAuth;\n\nvar client = new SeedAnyAuthClient(\"TOKEN\");\nawait client.Auth.GetTokenAsync(\n new GetTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n Audience = \"https://api.example.com\",\n GrantType = \"client_credentials\",\n Scope = \"scope\",\n }\n);\n" } }, { diff --git a/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Unit/MockServer/GetTokenTest.cs b/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Unit/MockServer/GetTokenTest.cs index 69f204172ea..b039876e1a5 100644 --- a/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Unit/MockServer/GetTokenTest.cs +++ b/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Unit/MockServer/GetTokenTest.cs @@ -20,7 +20,8 @@ public async Task MockServerTest() "client_id": "client_id", "client_secret": "client_secret", "audience": "https://api.example.com", - "grant_type": "client_credentials" + "grant_type": "client_credentials", + "scope": "scope" } """; @@ -54,7 +55,7 @@ public async Task MockServerTest() ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", }, RequestOptions ); diff --git a/seed/csharp-sdk/any-auth/src/SeedAnyAuth/Auth/AuthClient.cs b/seed/csharp-sdk/any-auth/src/SeedAnyAuth/Auth/AuthClient.cs index 1a5239e6756..14cf91c577d 100644 --- a/seed/csharp-sdk/any-auth/src/SeedAnyAuth/Auth/AuthClient.cs +++ b/seed/csharp-sdk/any-auth/src/SeedAnyAuth/Auth/AuthClient.cs @@ -25,7 +25,7 @@ internal AuthClient(RawClient client) /// ClientSecret = "client_secret", /// Audience = "https://api.example.com", /// GrantType = "client_credentials", - /// Scope = null, + /// Scope = "scope", /// } /// ); /// diff --git a/seed/csharp-sdk/audiences/README.md b/seed/csharp-sdk/audiences/README.md index 090f4a66383..fb27aa0fb91 100644 --- a/seed/csharp-sdk/audiences/README.md +++ b/seed/csharp-sdk/audiences/README.md @@ -19,7 +19,14 @@ Instantiate and use the client with the following: using SeedAudiences; var client = new SeedAudiencesClient(); -await client.Foo.FindAsync(new FindRequest { PublicProperty = null, PrivateProperty = null }); +await client.Foo.FindAsync( + new FindRequest + { + OptionalString = "optionalString", + PublicProperty = "publicProperty", + PrivateProperty = 1, + } +); ``` ## Exception Handling diff --git a/seed/csharp-sdk/audiences/reference.md b/seed/csharp-sdk/audiences/reference.md index 2275ef0cddb..d0fcbafc736 100644 --- a/seed/csharp-sdk/audiences/reference.md +++ b/seed/csharp-sdk/audiences/reference.md @@ -65,7 +65,14 @@ await client.FolderD.Service.GetDirectThreadAsync();
```csharp -await client.Foo.FindAsync(new FindRequest { PublicProperty = null, PrivateProperty = null }); +await client.Foo.FindAsync( + new FindRequest + { + OptionalString = "optionalString", + PublicProperty = "publicProperty", + PrivateProperty = 1, + } +); ```
diff --git a/seed/csharp-sdk/audiences/snippet.json b/seed/csharp-sdk/audiences/snippet.json index 70a38b4d3db..c78961114dd 100644 --- a/seed/csharp-sdk/audiences/snippet.json +++ b/seed/csharp-sdk/audiences/snippet.json @@ -34,7 +34,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedAudiences;\n\nvar client = new SeedAudiencesClient();\nawait client.Foo.FindAsync(new FindRequest { PublicProperty = null, PrivateProperty = null });\n" + "client": "using SeedAudiences;\n\nvar client = new SeedAudiencesClient();\nawait client.Foo.FindAsync(\n new FindRequest\n {\n OptionalString = \"optionalString\",\n PublicProperty = \"publicProperty\",\n PrivateProperty = 1,\n }\n);\n" } } ] diff --git a/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Unit/MockServer/FindTest.cs b/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Unit/MockServer/FindTest.cs index a16ce74b4a3..1797f778a3a 100644 --- a/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Unit/MockServer/FindTest.cs +++ b/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Unit/MockServer/FindTest.cs @@ -16,7 +16,10 @@ public class FindTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "publicProperty": "publicProperty", + "privateProperty": 1 + } """; const string mockResponse = """ @@ -30,6 +33,7 @@ public async Task MockServerTest() WireMock .RequestBuilders.Request.Create() .WithPath("/") + .WithParam("optionalString", "optionalString") .UsingPost() .WithBodyAsJson(requestJson) ) @@ -41,7 +45,12 @@ public async Task MockServerTest() ); var response = await Client.Foo.FindAsync( - new FindRequest { PublicProperty = null, PrivateProperty = null }, + new FindRequest + { + OptionalString = "optionalString", + PublicProperty = "publicProperty", + PrivateProperty = 1, + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/audiences/src/SeedAudiences/Foo/FooClient.cs b/seed/csharp-sdk/audiences/src/SeedAudiences/Foo/FooClient.cs index 27af342114b..7d6b0bd511b 100644 --- a/seed/csharp-sdk/audiences/src/SeedAudiences/Foo/FooClient.cs +++ b/seed/csharp-sdk/audiences/src/SeedAudiences/Foo/FooClient.cs @@ -18,7 +18,14 @@ internal FooClient(RawClient client) /// /// - /// await client.Foo.FindAsync(new FindRequest { PublicProperty = null, PrivateProperty = null }); + /// await client.Foo.FindAsync( + /// new FindRequest + /// { + /// OptionalString = "optionalString", + /// PublicProperty = "publicProperty", + /// PrivateProperty = 1, + /// } + /// ); /// /// public async Task FindAsync( diff --git a/seed/csharp-sdk/cross-package-type-names/README.md b/seed/csharp-sdk/cross-package-type-names/README.md index a24063ed2cf..a8786920c27 100644 --- a/seed/csharp-sdk/cross-package-type-names/README.md +++ b/seed/csharp-sdk/cross-package-type-names/README.md @@ -19,7 +19,14 @@ Instantiate and use the client with the following: using SeedCrossPackageTypeNames; var client = new SeedCrossPackageTypeNamesClient(); -await client.Foo.FindAsync(new FindRequest { PublicProperty = null, PrivateProperty = null }); +await client.Foo.FindAsync( + new FindRequest + { + OptionalString = "optionalString", + PublicProperty = "publicProperty", + PrivateProperty = 1, + } +); ``` ## Exception Handling diff --git a/seed/csharp-sdk/cross-package-type-names/reference.md b/seed/csharp-sdk/cross-package-type-names/reference.md index b216ec05dca..7132daad412 100644 --- a/seed/csharp-sdk/cross-package-type-names/reference.md +++ b/seed/csharp-sdk/cross-package-type-names/reference.md @@ -65,7 +65,14 @@ await client.FolderD.Service.GetDirectThreadAsync();
```csharp -await client.Foo.FindAsync(new FindRequest { PublicProperty = null, PrivateProperty = null }); +await client.Foo.FindAsync( + new FindRequest + { + OptionalString = "optionalString", + PublicProperty = "publicProperty", + PrivateProperty = 1, + } +); ```
diff --git a/seed/csharp-sdk/cross-package-type-names/snippet.json b/seed/csharp-sdk/cross-package-type-names/snippet.json index 162276eb49a..4d7b0185c54 100644 --- a/seed/csharp-sdk/cross-package-type-names/snippet.json +++ b/seed/csharp-sdk/cross-package-type-names/snippet.json @@ -34,7 +34,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedCrossPackageTypeNames;\n\nvar client = new SeedCrossPackageTypeNamesClient();\nawait client.Foo.FindAsync(new FindRequest { PublicProperty = null, PrivateProperty = null });\n" + "client": "using SeedCrossPackageTypeNames;\n\nvar client = new SeedCrossPackageTypeNamesClient();\nawait client.Foo.FindAsync(\n new FindRequest\n {\n OptionalString = \"optionalString\",\n PublicProperty = \"publicProperty\",\n PrivateProperty = 1,\n }\n);\n" } } ] diff --git a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Unit/MockServer/FindTest.cs b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Unit/MockServer/FindTest.cs index cc15b7a5473..0cdca215a64 100644 --- a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Unit/MockServer/FindTest.cs +++ b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Unit/MockServer/FindTest.cs @@ -16,7 +16,10 @@ public class FindTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "publicProperty": "publicProperty", + "privateProperty": 1 + } """; const string mockResponse = """ @@ -30,6 +33,7 @@ public async Task MockServerTest() WireMock .RequestBuilders.Request.Create() .WithPath("/") + .WithParam("optionalString", "optionalString") .UsingPost() .WithBodyAsJson(requestJson) ) @@ -41,7 +45,12 @@ public async Task MockServerTest() ); var response = await Client.Foo.FindAsync( - new FindRequest { PublicProperty = null, PrivateProperty = null }, + new FindRequest + { + OptionalString = "optionalString", + PublicProperty = "publicProperty", + PrivateProperty = 1, + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames/Foo/FooClient.cs b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames/Foo/FooClient.cs index fd48ca6120a..c876d288b28 100644 --- a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames/Foo/FooClient.cs +++ b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames/Foo/FooClient.cs @@ -18,7 +18,14 @@ internal FooClient(RawClient client) /// /// - /// await client.Foo.FindAsync(new FindRequest { PublicProperty = null, PrivateProperty = null }); + /// await client.Foo.FindAsync( + /// new FindRequest + /// { + /// OptionalString = "optionalString", + /// PublicProperty = "publicProperty", + /// PrivateProperty = 1, + /// } + /// ); /// /// public async Task FindAsync( diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/.mock/definition/path-param.yml b/seed/csharp-sdk/enum/forward-compatible-enums/.mock/definition/path-param.yml index 7553551fdc2..5afc7329f1e 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/.mock/definition/path-param.yml +++ b/seed/csharp-sdk/enum/forward-compatible-enums/.mock/definition/path-param.yml @@ -6,16 +6,12 @@ service: base-path: "" endpoints: send: - path: /path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor} + path: /path/{operand}/{operandOrColor} method: POST path-parameters: operand: root.Operand - maybeOperand: optional operandOrColor: root.ColorOrOperand - maybeOperandOrColor: optional examples: - path-parameters: operand: $root.Operand.GreaterThan - maybeOperand: $root.Operand.LessThan operandOrColor: $root.ColorOrOperand.Red - maybeOperandOrColor: $root.ColorOrOperand.Red \ No newline at end of file diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/reference.md b/seed/csharp-sdk/enum/forward-compatible-enums/reference.md index d8a70f45832..0f6bf0a2b23 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/reference.md +++ b/seed/csharp-sdk/enum/forward-compatible-enums/reference.md @@ -43,7 +43,7 @@ await client.InlinedRequest.SendAsync( ## PathParam -
client.PathParam.SendAsync(operand, maybeOperand, operandOrColor, maybeOperandOrColor) +
client.PathParam.SendAsync(operand, operandOrColor)
@@ -56,7 +56,7 @@ await client.InlinedRequest.SendAsync(
```csharp -await client.PathParam.SendAsync(Operand.GreaterThan, Operand.LessThan, Color.Red, Color.Red); +await client.PathParam.SendAsync(Operand.GreaterThan, Color.Red); ```
@@ -79,24 +79,8 @@ await client.PathParam.SendAsync(Operand.GreaterThan, Operand.LessThan, Color.Re
-**maybeOperand:** `Operand?` - -
-
- -
-
- **operandOrColor:** `OneOf` -
-
- -
-
- -**maybeOperandOrColor:** `OneOf?` -
@@ -167,7 +151,9 @@ await client.QueryParam.SendListAsync( new SendEnumListAsQueryParamRequest { Operand = [Operand.GreaterThan], + MaybeOperand = [Operand.GreaterThan], OperandOrColor = [Color.Red], + MaybeOperandOrColor = [null], } ); ``` diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/snippet.json b/seed/csharp-sdk/enum/forward-compatible-enums/snippet.json index 6c3e7e0d6c7..bc426a5d09e 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/snippet.json +++ b/seed/csharp-sdk/enum/forward-compatible-enums/snippet.json @@ -16,13 +16,13 @@ { "example_identifier": null, "id": { - "path": "/path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}", + "path": "/path/{operand}/{operandOrColor}", "method": "POST", "identifier_override": "endpoint_path-param.send" }, "snippet": { "type": "typescript", - "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.PathParam.SendAsync(Operand.GreaterThan, Operand.LessThan, Color.Red, Color.Red);\n" + "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.PathParam.SendAsync(Operand.GreaterThan, Color.Red);\n" } }, { @@ -46,7 +46,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.QueryParam.SendListAsync(\n new SendEnumListAsQueryParamRequest\n {\n Operand = [Operand.GreaterThan],\n OperandOrColor = [Color.Red],\n }\n);\n" + "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.QueryParam.SendListAsync(\n new SendEnumListAsQueryParamRequest\n {\n Operand = [Operand.GreaterThan],\n MaybeOperand = [Operand.GreaterThan],\n OperandOrColor = [Color.Red],\n MaybeOperandOrColor = [null],\n }\n);\n" } } ] diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/SendListTest.cs b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/SendListTest.cs index 57d1693c6f9..b745df9ceea 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/SendListTest.cs +++ b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/SendListTest.cs @@ -17,6 +17,7 @@ public void MockServerTest() .RequestBuilders.Request.Create() .WithPath("/query-list") .WithParam("operand", ">") + .WithParam("maybeOperand", ">") .WithParam("operandOrColor", "red") .UsingPost() ) @@ -28,7 +29,9 @@ await Client.QueryParam.SendListAsync( new SendEnumListAsQueryParamRequest { Operand = [Operand.GreaterThan], + MaybeOperand = [Operand.GreaterThan], OperandOrColor = [Color.Red], + MaybeOperandOrColor = [null], }, RequestOptions ) diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/SendTest.cs b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/SendTest.cs index 18a45b626d9..076fcb05034 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/SendTest.cs +++ b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/SendTest.cs @@ -17,6 +17,7 @@ public void MockServerTest_1() .RequestBuilders.Request.Create() .WithPath("/query") .WithParam("operand", ">") + .WithParam("maybeOperand", ">") .WithParam("operandOrColor", "red") .UsingPost() ) @@ -28,7 +29,9 @@ await Client.QueryParam.SendAsync( new SendEnumAsQueryParamRequest { Operand = Operand.GreaterThan, + MaybeOperand = Operand.GreaterThan, OperandOrColor = Color.Red, + MaybeOperandOrColor = null, }, RequestOptions ) diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/PathParam/PathParamClient.cs b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/PathParam/PathParamClient.cs index 5a4bcb191c0..5b03ab48d8a 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/PathParam/PathParamClient.cs +++ b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/PathParam/PathParamClient.cs @@ -19,14 +19,12 @@ internal PathParamClient(RawClient client) /// /// - /// await client.PathParam.SendAsync(Operand.GreaterThan, Operand.LessThan, Color.Red, Color.Red); + /// await client.PathParam.SendAsync(Operand.GreaterThan, Color.Red); /// /// public async Task SendAsync( Operand operand, - Operand? maybeOperand, OneOf operandOrColor, - OneOf? maybeOperandOrColor, RequestOptions? options = null, CancellationToken cancellationToken = default ) @@ -36,7 +34,7 @@ public async Task SendAsync( { BaseUrl = _client.Options.BaseUrl, Method = HttpMethod.Post, - Path = $"path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}", + Path = $"path/{operand}/{operandOrColor}", Options = options, }, cancellationToken diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/QueryParam/QueryParamClient.cs b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/QueryParam/QueryParamClient.cs index 6470d232d08..fc532cc713a 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/QueryParam/QueryParamClient.cs +++ b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/QueryParam/QueryParamClient.cs @@ -69,7 +69,9 @@ public async Task SendAsync( /// new SendEnumListAsQueryParamRequest /// { /// Operand = [Operand.GreaterThan], + /// MaybeOperand = [Operand.GreaterThan], /// OperandOrColor = [Color.Red], + /// MaybeOperandOrColor = [null], /// } /// ); /// diff --git a/seed/csharp-sdk/enum/plain-enums/.mock/definition/path-param.yml b/seed/csharp-sdk/enum/plain-enums/.mock/definition/path-param.yml index 7553551fdc2..5afc7329f1e 100644 --- a/seed/csharp-sdk/enum/plain-enums/.mock/definition/path-param.yml +++ b/seed/csharp-sdk/enum/plain-enums/.mock/definition/path-param.yml @@ -6,16 +6,12 @@ service: base-path: "" endpoints: send: - path: /path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor} + path: /path/{operand}/{operandOrColor} method: POST path-parameters: operand: root.Operand - maybeOperand: optional operandOrColor: root.ColorOrOperand - maybeOperandOrColor: optional examples: - path-parameters: operand: $root.Operand.GreaterThan - maybeOperand: $root.Operand.LessThan operandOrColor: $root.ColorOrOperand.Red - maybeOperandOrColor: $root.ColorOrOperand.Red \ No newline at end of file diff --git a/seed/csharp-sdk/enum/plain-enums/reference.md b/seed/csharp-sdk/enum/plain-enums/reference.md index d8a70f45832..0f6bf0a2b23 100644 --- a/seed/csharp-sdk/enum/plain-enums/reference.md +++ b/seed/csharp-sdk/enum/plain-enums/reference.md @@ -43,7 +43,7 @@ await client.InlinedRequest.SendAsync(
## PathParam -
client.PathParam.SendAsync(operand, maybeOperand, operandOrColor, maybeOperandOrColor) +
client.PathParam.SendAsync(operand, operandOrColor)
@@ -56,7 +56,7 @@ await client.InlinedRequest.SendAsync(
```csharp -await client.PathParam.SendAsync(Operand.GreaterThan, Operand.LessThan, Color.Red, Color.Red); +await client.PathParam.SendAsync(Operand.GreaterThan, Color.Red); ```
@@ -79,24 +79,8 @@ await client.PathParam.SendAsync(Operand.GreaterThan, Operand.LessThan, Color.Re
-**maybeOperand:** `Operand?` - -
-
- -
-
- **operandOrColor:** `OneOf` -
-
- -
-
- -**maybeOperandOrColor:** `OneOf?` -
@@ -167,7 +151,9 @@ await client.QueryParam.SendListAsync( new SendEnumListAsQueryParamRequest { Operand = [Operand.GreaterThan], + MaybeOperand = [Operand.GreaterThan], OperandOrColor = [Color.Red], + MaybeOperandOrColor = [null], } ); ``` diff --git a/seed/csharp-sdk/enum/plain-enums/snippet.json b/seed/csharp-sdk/enum/plain-enums/snippet.json index 6c3e7e0d6c7..bc426a5d09e 100644 --- a/seed/csharp-sdk/enum/plain-enums/snippet.json +++ b/seed/csharp-sdk/enum/plain-enums/snippet.json @@ -16,13 +16,13 @@ { "example_identifier": null, "id": { - "path": "/path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}", + "path": "/path/{operand}/{operandOrColor}", "method": "POST", "identifier_override": "endpoint_path-param.send" }, "snippet": { "type": "typescript", - "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.PathParam.SendAsync(Operand.GreaterThan, Operand.LessThan, Color.Red, Color.Red);\n" + "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.PathParam.SendAsync(Operand.GreaterThan, Color.Red);\n" } }, { @@ -46,7 +46,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.QueryParam.SendListAsync(\n new SendEnumListAsQueryParamRequest\n {\n Operand = [Operand.GreaterThan],\n OperandOrColor = [Color.Red],\n }\n);\n" + "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.QueryParam.SendListAsync(\n new SendEnumListAsQueryParamRequest\n {\n Operand = [Operand.GreaterThan],\n MaybeOperand = [Operand.GreaterThan],\n OperandOrColor = [Color.Red],\n MaybeOperandOrColor = [null],\n }\n);\n" } } ] diff --git a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/SendListTest.cs b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/SendListTest.cs index 57d1693c6f9..b745df9ceea 100644 --- a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/SendListTest.cs +++ b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/SendListTest.cs @@ -17,6 +17,7 @@ public void MockServerTest() .RequestBuilders.Request.Create() .WithPath("/query-list") .WithParam("operand", ">") + .WithParam("maybeOperand", ">") .WithParam("operandOrColor", "red") .UsingPost() ) @@ -28,7 +29,9 @@ await Client.QueryParam.SendListAsync( new SendEnumListAsQueryParamRequest { Operand = [Operand.GreaterThan], + MaybeOperand = [Operand.GreaterThan], OperandOrColor = [Color.Red], + MaybeOperandOrColor = [null], }, RequestOptions ) diff --git a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/SendTest.cs b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/SendTest.cs index 18a45b626d9..076fcb05034 100644 --- a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/SendTest.cs +++ b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/SendTest.cs @@ -17,6 +17,7 @@ public void MockServerTest_1() .RequestBuilders.Request.Create() .WithPath("/query") .WithParam("operand", ">") + .WithParam("maybeOperand", ">") .WithParam("operandOrColor", "red") .UsingPost() ) @@ -28,7 +29,9 @@ await Client.QueryParam.SendAsync( new SendEnumAsQueryParamRequest { Operand = Operand.GreaterThan, + MaybeOperand = Operand.GreaterThan, OperandOrColor = Color.Red, + MaybeOperandOrColor = null, }, RequestOptions ) diff --git a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/PathParam/PathParamClient.cs b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/PathParam/PathParamClient.cs index 5a4bcb191c0..5b03ab48d8a 100644 --- a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/PathParam/PathParamClient.cs +++ b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/PathParam/PathParamClient.cs @@ -19,14 +19,12 @@ internal PathParamClient(RawClient client) /// /// - /// await client.PathParam.SendAsync(Operand.GreaterThan, Operand.LessThan, Color.Red, Color.Red); + /// await client.PathParam.SendAsync(Operand.GreaterThan, Color.Red); /// /// public async Task SendAsync( Operand operand, - Operand? maybeOperand, OneOf operandOrColor, - OneOf? maybeOperandOrColor, RequestOptions? options = null, CancellationToken cancellationToken = default ) @@ -36,7 +34,7 @@ public async Task SendAsync( { BaseUrl = _client.Options.BaseUrl, Method = HttpMethod.Post, - Path = $"path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}", + Path = $"path/{operand}/{operandOrColor}", Options = options, }, cancellationToken diff --git a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/QueryParam/QueryParamClient.cs b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/QueryParam/QueryParamClient.cs index 6470d232d08..fc532cc713a 100644 --- a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/QueryParam/QueryParamClient.cs +++ b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/QueryParam/QueryParamClient.cs @@ -69,7 +69,9 @@ public async Task SendAsync( /// new SendEnumListAsQueryParamRequest /// { /// Operand = [Operand.GreaterThan], + /// MaybeOperand = [Operand.GreaterThan], /// OperandOrColor = [Color.Red], + /// MaybeOperandOrColor = [null], /// } /// ); /// diff --git a/seed/csharp-sdk/examples/no-custom-config/reference.md b/seed/csharp-sdk/examples/no-custom-config/reference.md index 50075b17296..57a2b0a460e 100644 --- a/seed/csharp-sdk/examples/no-custom-config/reference.md +++ b/seed/csharp-sdk/examples/no-custom-config/reference.md @@ -448,19 +448,194 @@ await client.Service.GetMetadataAsync( await client.Service.CreateBigEntityAsync( new BigEntity { - CastMember = null, - ExtendedMovie = null, - Entity = null, - Metadata = null, - CommonMetadata = null, - EventInfo = null, - Data = null, - Migration = null, - Exception = null, - Test = null, - Node = null, - Directory = null, - Moment = null, + CastMember = new Actor { Name = "name", Id = "id" }, + ExtendedMovie = new ExtendedMovie + { + Cast = new List() { "cast", "cast" }, + }, + Entity = new Entity { Type = BasicType.Primitive, Name = "name" }, + Metadata = "metadata", + CommonMetadata = new SeedExamples.Commons.Metadata + { + Id = "id", + Data = new Dictionary() { { "data", "data" } }, + JsonString = "jsonString", + }, + EventInfo = new SeedExamples.Commons.Metadata + { + Id = "id", + Data = new Dictionary() { { "data", "data" } }, + JsonString = "jsonString", + }, + Data = "data", + Migration = new Migration { Name = "name", Status = MigrationStatus.Running }, + Exception = new ExceptionInfo + { + ExceptionType = "exceptionType", + ExceptionMessage = "exceptionMessage", + ExceptionStacktrace = "exceptionStacktrace", + }, + Test = true, + Node = new Node + { + Name = "name", + Nodes = new List() + { + new Node + { + Name = "name", + Nodes = new List() + { + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + }, + Trees = new List() + { + new Tree { Nodes = new List() { } }, + new Tree { Nodes = new List() { } }, + }, + }, + new Node + { + Name = "name", + Nodes = new List() + { + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + }, + Trees = new List() + { + new Tree { Nodes = new List() { } }, + new Tree { Nodes = new List() { } }, + }, + }, + }, + Trees = new List() + { + new Tree + { + Nodes = new List() + { + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + }, + }, + new Tree + { + Nodes = new List() + { + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + }, + }, + }, + }, + Directory = new Directory + { + Name = "name", + Files = new List() + { + new SeedExamples.File { Name = "name", Contents = "contents" }, + new SeedExamples.File { Name = "name", Contents = "contents" }, + }, + Directories = new List() + { + new Directory + { + Name = "name", + Files = new List() + { + new SeedExamples.File { Name = "name", Contents = "contents" }, + new SeedExamples.File { Name = "name", Contents = "contents" }, + }, + Directories = new List() + { + new Directory + { + Name = "name", + Files = new List() { }, + Directories = new List() { }, + }, + new Directory + { + Name = "name", + Files = new List() { }, + Directories = new List() { }, + }, + }, + }, + new Directory + { + Name = "name", + Files = new List() + { + new SeedExamples.File { Name = "name", Contents = "contents" }, + new SeedExamples.File { Name = "name", Contents = "contents" }, + }, + Directories = new List() + { + new Directory + { + Name = "name", + Files = new List() { }, + Directories = new List() { }, + }, + new Directory + { + Name = "name", + Files = new List() { }, + Directories = new List() { }, + }, + }, + }, + }, + }, + Moment = new Moment + { + Id = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Date = new DateOnly(2023, 1, 15), + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + }, } ); ``` diff --git a/seed/csharp-sdk/examples/no-custom-config/snippet.json b/seed/csharp-sdk/examples/no-custom-config/snippet.json index 5524ef511d3..a940cd3cbb2 100644 --- a/seed/csharp-sdk/examples/no-custom-config/snippet.json +++ b/seed/csharp-sdk/examples/no-custom-config/snippet.json @@ -130,7 +130,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExamples;\n\nvar client = new SeedExamplesClient(\"TOKEN\");\nawait client.Service.CreateBigEntityAsync(\n new BigEntity\n {\n CastMember = null,\n ExtendedMovie = null,\n Entity = null,\n Metadata = null,\n CommonMetadata = null,\n EventInfo = null,\n Data = null,\n Migration = null,\n Exception = null,\n Test = null,\n Node = null,\n Directory = null,\n Moment = null,\n }\n);\n" + "client": "using SeedExamples;\n\nvar client = new SeedExamplesClient(\"TOKEN\");\nawait client.Service.CreateBigEntityAsync(\n new BigEntity\n {\n CastMember = new Actor { Name = \"name\", Id = \"id\" },\n ExtendedMovie = new ExtendedMovie\n {\n Cast = new List() { \"cast\", \"cast\" },\n },\n Entity = new Entity { Type = BasicType.Primitive, Name = \"name\" },\n Metadata = \"metadata\",\n CommonMetadata = new SeedExamples.Commons.Metadata\n {\n Id = \"id\",\n Data = new Dictionary() { { \"data\", \"data\" } },\n JsonString = \"jsonString\",\n },\n EventInfo = new SeedExamples.Commons.Metadata\n {\n Id = \"id\",\n Data = new Dictionary() { { \"data\", \"data\" } },\n JsonString = \"jsonString\",\n },\n Data = \"data\",\n Migration = new Migration { Name = \"name\", Status = MigrationStatus.Running },\n Exception = new ExceptionInfo\n {\n ExceptionType = \"exceptionType\",\n ExceptionMessage = \"exceptionMessage\",\n ExceptionStacktrace = \"exceptionStacktrace\",\n },\n Test = true,\n Node = new Node\n {\n Name = \"name\",\n Nodes = new List()\n {\n new Node\n {\n Name = \"name\",\n Nodes = new List()\n {\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n },\n Trees = new List()\n {\n new Tree { Nodes = new List() { } },\n new Tree { Nodes = new List() { } },\n },\n },\n new Node\n {\n Name = \"name\",\n Nodes = new List()\n {\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n },\n Trees = new List()\n {\n new Tree { Nodes = new List() { } },\n new Tree { Nodes = new List() { } },\n },\n },\n },\n Trees = new List()\n {\n new Tree\n {\n Nodes = new List()\n {\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n },\n },\n new Tree\n {\n Nodes = new List()\n {\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n },\n },\n },\n },\n Directory = new Directory\n {\n Name = \"name\",\n Files = new List()\n {\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n },\n Directories = new List()\n {\n new Directory\n {\n Name = \"name\",\n Files = new List()\n {\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n },\n Directories = new List()\n {\n new Directory\n {\n Name = \"name\",\n Files = new List() { },\n Directories = new List() { },\n },\n new Directory\n {\n Name = \"name\",\n Files = new List() { },\n Directories = new List() { },\n },\n },\n },\n new Directory\n {\n Name = \"name\",\n Files = new List()\n {\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n },\n Directories = new List()\n {\n new Directory\n {\n Name = \"name\",\n Files = new List() { },\n Directories = new List() { },\n },\n new Directory\n {\n Name = \"name\",\n Files = new List() { },\n Directories = new List() { },\n },\n },\n },\n },\n },\n Moment = new Moment\n {\n Id = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Date = new DateOnly(2023, 1, 15),\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n },\n }\n);\n" } } ] diff --git a/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples/Service/ServiceClient.cs b/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples/Service/ServiceClient.cs index 22be8ea340b..be3bfa93297 100644 --- a/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples/Service/ServiceClient.cs +++ b/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples/Service/ServiceClient.cs @@ -187,19 +187,194 @@ public async Task GetMetadataAsync( /// await client.Service.CreateBigEntityAsync( /// new BigEntity /// { - /// CastMember = null, - /// ExtendedMovie = null, - /// Entity = null, - /// Metadata = null, - /// CommonMetadata = null, - /// EventInfo = null, - /// Data = null, - /// Migration = null, - /// Exception = null, - /// Test = null, - /// Node = null, - /// Directory = null, - /// Moment = null, + /// CastMember = new Actor { Name = "name", Id = "id" }, + /// ExtendedMovie = new ExtendedMovie + /// { + /// Cast = new List<string>() { "cast", "cast" }, + /// }, + /// Entity = new Entity { Type = BasicType.Primitive, Name = "name" }, + /// Metadata = "metadata", + /// CommonMetadata = new SeedExamples.Commons.Metadata + /// { + /// Id = "id", + /// Data = new Dictionary<string, string>() { { "data", "data" } }, + /// JsonString = "jsonString", + /// }, + /// EventInfo = new SeedExamples.Commons.Metadata + /// { + /// Id = "id", + /// Data = new Dictionary<string, string>() { { "data", "data" } }, + /// JsonString = "jsonString", + /// }, + /// Data = "data", + /// Migration = new Migration { Name = "name", Status = MigrationStatus.Running }, + /// Exception = new ExceptionInfo + /// { + /// ExceptionType = "exceptionType", + /// ExceptionMessage = "exceptionMessage", + /// ExceptionStacktrace = "exceptionStacktrace", + /// }, + /// Test = true, + /// Node = new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() + /// { + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() + /// { + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// }, + /// Trees = new List<Tree>() + /// { + /// new Tree { Nodes = new List<Node>() { } }, + /// new Tree { Nodes = new List<Node>() { } }, + /// }, + /// }, + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() + /// { + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// }, + /// Trees = new List<Tree>() + /// { + /// new Tree { Nodes = new List<Node>() { } }, + /// new Tree { Nodes = new List<Node>() { } }, + /// }, + /// }, + /// }, + /// Trees = new List<Tree>() + /// { + /// new Tree + /// { + /// Nodes = new List<Node>() + /// { + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// }, + /// }, + /// new Tree + /// { + /// Nodes = new List<Node>() + /// { + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// }, + /// }, + /// }, + /// }, + /// Directory = new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() + /// { + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// }, + /// Directories = new List<Directory>() + /// { + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() + /// { + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// }, + /// Directories = new List<Directory>() + /// { + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() { }, + /// Directories = new List<Directory>() { }, + /// }, + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() { }, + /// Directories = new List<Directory>() { }, + /// }, + /// }, + /// }, + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() + /// { + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// }, + /// Directories = new List<Directory>() + /// { + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() { }, + /// Directories = new List<Directory>() { }, + /// }, + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() { }, + /// Directories = new List<Directory>() { }, + /// }, + /// }, + /// }, + /// }, + /// }, + /// Moment = new Moment + /// { + /// Id = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Date = new DateOnly(2023, 1, 15), + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// }, /// } /// ); /// diff --git a/seed/csharp-sdk/examples/readme-config/reference.md b/seed/csharp-sdk/examples/readme-config/reference.md index 50075b17296..57a2b0a460e 100644 --- a/seed/csharp-sdk/examples/readme-config/reference.md +++ b/seed/csharp-sdk/examples/readme-config/reference.md @@ -448,19 +448,194 @@ await client.Service.GetMetadataAsync( await client.Service.CreateBigEntityAsync( new BigEntity { - CastMember = null, - ExtendedMovie = null, - Entity = null, - Metadata = null, - CommonMetadata = null, - EventInfo = null, - Data = null, - Migration = null, - Exception = null, - Test = null, - Node = null, - Directory = null, - Moment = null, + CastMember = new Actor { Name = "name", Id = "id" }, + ExtendedMovie = new ExtendedMovie + { + Cast = new List() { "cast", "cast" }, + }, + Entity = new Entity { Type = BasicType.Primitive, Name = "name" }, + Metadata = "metadata", + CommonMetadata = new SeedExamples.Commons.Metadata + { + Id = "id", + Data = new Dictionary() { { "data", "data" } }, + JsonString = "jsonString", + }, + EventInfo = new SeedExamples.Commons.Metadata + { + Id = "id", + Data = new Dictionary() { { "data", "data" } }, + JsonString = "jsonString", + }, + Data = "data", + Migration = new Migration { Name = "name", Status = MigrationStatus.Running }, + Exception = new ExceptionInfo + { + ExceptionType = "exceptionType", + ExceptionMessage = "exceptionMessage", + ExceptionStacktrace = "exceptionStacktrace", + }, + Test = true, + Node = new Node + { + Name = "name", + Nodes = new List() + { + new Node + { + Name = "name", + Nodes = new List() + { + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + }, + Trees = new List() + { + new Tree { Nodes = new List() { } }, + new Tree { Nodes = new List() { } }, + }, + }, + new Node + { + Name = "name", + Nodes = new List() + { + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + }, + Trees = new List() + { + new Tree { Nodes = new List() { } }, + new Tree { Nodes = new List() { } }, + }, + }, + }, + Trees = new List() + { + new Tree + { + Nodes = new List() + { + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + }, + }, + new Tree + { + Nodes = new List() + { + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + new Node + { + Name = "name", + Nodes = new List() { }, + Trees = new List() { }, + }, + }, + }, + }, + }, + Directory = new Directory + { + Name = "name", + Files = new List() + { + new SeedExamples.File { Name = "name", Contents = "contents" }, + new SeedExamples.File { Name = "name", Contents = "contents" }, + }, + Directories = new List() + { + new Directory + { + Name = "name", + Files = new List() + { + new SeedExamples.File { Name = "name", Contents = "contents" }, + new SeedExamples.File { Name = "name", Contents = "contents" }, + }, + Directories = new List() + { + new Directory + { + Name = "name", + Files = new List() { }, + Directories = new List() { }, + }, + new Directory + { + Name = "name", + Files = new List() { }, + Directories = new List() { }, + }, + }, + }, + new Directory + { + Name = "name", + Files = new List() + { + new SeedExamples.File { Name = "name", Contents = "contents" }, + new SeedExamples.File { Name = "name", Contents = "contents" }, + }, + Directories = new List() + { + new Directory + { + Name = "name", + Files = new List() { }, + Directories = new List() { }, + }, + new Directory + { + Name = "name", + Files = new List() { }, + Directories = new List() { }, + }, + }, + }, + }, + }, + Moment = new Moment + { + Id = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Date = new DateOnly(2023, 1, 15), + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + }, } ); ``` diff --git a/seed/csharp-sdk/examples/readme-config/snippet.json b/seed/csharp-sdk/examples/readme-config/snippet.json index 5524ef511d3..a940cd3cbb2 100644 --- a/seed/csharp-sdk/examples/readme-config/snippet.json +++ b/seed/csharp-sdk/examples/readme-config/snippet.json @@ -130,7 +130,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExamples;\n\nvar client = new SeedExamplesClient(\"TOKEN\");\nawait client.Service.CreateBigEntityAsync(\n new BigEntity\n {\n CastMember = null,\n ExtendedMovie = null,\n Entity = null,\n Metadata = null,\n CommonMetadata = null,\n EventInfo = null,\n Data = null,\n Migration = null,\n Exception = null,\n Test = null,\n Node = null,\n Directory = null,\n Moment = null,\n }\n);\n" + "client": "using SeedExamples;\n\nvar client = new SeedExamplesClient(\"TOKEN\");\nawait client.Service.CreateBigEntityAsync(\n new BigEntity\n {\n CastMember = new Actor { Name = \"name\", Id = \"id\" },\n ExtendedMovie = new ExtendedMovie\n {\n Cast = new List() { \"cast\", \"cast\" },\n },\n Entity = new Entity { Type = BasicType.Primitive, Name = \"name\" },\n Metadata = \"metadata\",\n CommonMetadata = new SeedExamples.Commons.Metadata\n {\n Id = \"id\",\n Data = new Dictionary() { { \"data\", \"data\" } },\n JsonString = \"jsonString\",\n },\n EventInfo = new SeedExamples.Commons.Metadata\n {\n Id = \"id\",\n Data = new Dictionary() { { \"data\", \"data\" } },\n JsonString = \"jsonString\",\n },\n Data = \"data\",\n Migration = new Migration { Name = \"name\", Status = MigrationStatus.Running },\n Exception = new ExceptionInfo\n {\n ExceptionType = \"exceptionType\",\n ExceptionMessage = \"exceptionMessage\",\n ExceptionStacktrace = \"exceptionStacktrace\",\n },\n Test = true,\n Node = new Node\n {\n Name = \"name\",\n Nodes = new List()\n {\n new Node\n {\n Name = \"name\",\n Nodes = new List()\n {\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n },\n Trees = new List()\n {\n new Tree { Nodes = new List() { } },\n new Tree { Nodes = new List() { } },\n },\n },\n new Node\n {\n Name = \"name\",\n Nodes = new List()\n {\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n },\n Trees = new List()\n {\n new Tree { Nodes = new List() { } },\n new Tree { Nodes = new List() { } },\n },\n },\n },\n Trees = new List()\n {\n new Tree\n {\n Nodes = new List()\n {\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n },\n },\n new Tree\n {\n Nodes = new List()\n {\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n new Node\n {\n Name = \"name\",\n Nodes = new List() { },\n Trees = new List() { },\n },\n },\n },\n },\n },\n Directory = new Directory\n {\n Name = \"name\",\n Files = new List()\n {\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n },\n Directories = new List()\n {\n new Directory\n {\n Name = \"name\",\n Files = new List()\n {\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n },\n Directories = new List()\n {\n new Directory\n {\n Name = \"name\",\n Files = new List() { },\n Directories = new List() { },\n },\n new Directory\n {\n Name = \"name\",\n Files = new List() { },\n Directories = new List() { },\n },\n },\n },\n new Directory\n {\n Name = \"name\",\n Files = new List()\n {\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n new SeedExamples.File { Name = \"name\", Contents = \"contents\" },\n },\n Directories = new List()\n {\n new Directory\n {\n Name = \"name\",\n Files = new List() { },\n Directories = new List() { },\n },\n new Directory\n {\n Name = \"name\",\n Files = new List() { },\n Directories = new List() { },\n },\n },\n },\n },\n },\n Moment = new Moment\n {\n Id = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Date = new DateOnly(2023, 1, 15),\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n },\n }\n);\n" } } ] diff --git a/seed/csharp-sdk/examples/readme-config/src/SeedExamples/Service/ServiceClient.cs b/seed/csharp-sdk/examples/readme-config/src/SeedExamples/Service/ServiceClient.cs index 22be8ea340b..be3bfa93297 100644 --- a/seed/csharp-sdk/examples/readme-config/src/SeedExamples/Service/ServiceClient.cs +++ b/seed/csharp-sdk/examples/readme-config/src/SeedExamples/Service/ServiceClient.cs @@ -187,19 +187,194 @@ public async Task GetMetadataAsync( /// await client.Service.CreateBigEntityAsync( /// new BigEntity /// { - /// CastMember = null, - /// ExtendedMovie = null, - /// Entity = null, - /// Metadata = null, - /// CommonMetadata = null, - /// EventInfo = null, - /// Data = null, - /// Migration = null, - /// Exception = null, - /// Test = null, - /// Node = null, - /// Directory = null, - /// Moment = null, + /// CastMember = new Actor { Name = "name", Id = "id" }, + /// ExtendedMovie = new ExtendedMovie + /// { + /// Cast = new List<string>() { "cast", "cast" }, + /// }, + /// Entity = new Entity { Type = BasicType.Primitive, Name = "name" }, + /// Metadata = "metadata", + /// CommonMetadata = new SeedExamples.Commons.Metadata + /// { + /// Id = "id", + /// Data = new Dictionary<string, string>() { { "data", "data" } }, + /// JsonString = "jsonString", + /// }, + /// EventInfo = new SeedExamples.Commons.Metadata + /// { + /// Id = "id", + /// Data = new Dictionary<string, string>() { { "data", "data" } }, + /// JsonString = "jsonString", + /// }, + /// Data = "data", + /// Migration = new Migration { Name = "name", Status = MigrationStatus.Running }, + /// Exception = new ExceptionInfo + /// { + /// ExceptionType = "exceptionType", + /// ExceptionMessage = "exceptionMessage", + /// ExceptionStacktrace = "exceptionStacktrace", + /// }, + /// Test = true, + /// Node = new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() + /// { + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() + /// { + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// }, + /// Trees = new List<Tree>() + /// { + /// new Tree { Nodes = new List<Node>() { } }, + /// new Tree { Nodes = new List<Node>() { } }, + /// }, + /// }, + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() + /// { + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// }, + /// Trees = new List<Tree>() + /// { + /// new Tree { Nodes = new List<Node>() { } }, + /// new Tree { Nodes = new List<Node>() { } }, + /// }, + /// }, + /// }, + /// Trees = new List<Tree>() + /// { + /// new Tree + /// { + /// Nodes = new List<Node>() + /// { + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// }, + /// }, + /// new Tree + /// { + /// Nodes = new List<Node>() + /// { + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// new Node + /// { + /// Name = "name", + /// Nodes = new List<Node>() { }, + /// Trees = new List<Tree>() { }, + /// }, + /// }, + /// }, + /// }, + /// }, + /// Directory = new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() + /// { + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// }, + /// Directories = new List<Directory>() + /// { + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() + /// { + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// }, + /// Directories = new List<Directory>() + /// { + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() { }, + /// Directories = new List<Directory>() { }, + /// }, + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() { }, + /// Directories = new List<Directory>() { }, + /// }, + /// }, + /// }, + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() + /// { + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// new SeedExamples.File { Name = "name", Contents = "contents" }, + /// }, + /// Directories = new List<Directory>() + /// { + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() { }, + /// Directories = new List<Directory>() { }, + /// }, + /// new Directory + /// { + /// Name = "name", + /// Files = new List<SeedExamples.File>() { }, + /// Directories = new List<Directory>() { }, + /// }, + /// }, + /// }, + /// }, + /// }, + /// Moment = new Moment + /// { + /// Id = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Date = new DateOnly(2023, 1, 15), + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// }, /// } /// ); /// diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/reference.md b/seed/csharp-sdk/exhaustive/explicit-namespaces/reference.md index c00197361c2..78d0dfb682d 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/reference.md +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/reference.md @@ -275,7 +275,9 @@ await client.Endpoints.Container.GetAndReturnMapOfPrimToObjectAsync(
```csharp -await client.Endpoints.Container.GetAndReturnOptionalAsync(null); +await client.Endpoints.Container.GetAndReturnOptionalAsync( + new ObjectWithRequiredField { String = "string" } +); ```
@@ -492,19 +494,19 @@ await client.Endpoints.HttpMethods.TestPatchAsync( "id", new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", } ); ``` @@ -598,19 +600,19 @@ await client.Endpoints.HttpMethods.TestDeleteAsync("id"); await client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync( new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", } ); ``` @@ -746,7 +748,26 @@ await client.Endpoints.Object.GetAndReturnWithMapOfMapAsync( ```csharp await client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync( - new NestedObjectWithOptionalField { String = null, NestedObject = null } + new NestedObjectWithOptionalField + { + String = "string", + NestedObject = new ObjectWithOptionalField + { + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", + }, + } ); ``` @@ -794,19 +815,19 @@ await client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsync( String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, } ); @@ -865,19 +886,19 @@ await client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync( String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, new NestedObjectWithRequiredField @@ -885,19 +906,19 @@ await client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync( String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, } @@ -1659,19 +1680,19 @@ await client.InlinedRequests.PostWithObjectBodyandResponseAsync( Integer = 1, NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, } ); diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/snippet.json b/seed/csharp-sdk/exhaustive/explicit-namespaces/snippet.json index 00c96f7d2b1..1366aef8163 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/snippet.json +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/snippet.json @@ -82,7 +82,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Container.GetAndReturnOptionalAsync(null);\n" + "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Container.GetAndReturnOptionalAsync(\n new ObjectWithRequiredField { String = \"string\" }\n);\n" } }, { @@ -142,7 +142,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.HttpMethods.TestPatchAsync(\n \"id\",\n new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n }\n);\n" + "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.HttpMethods.TestPatchAsync(\n \"id\",\n new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n }\n);\n" } }, { @@ -166,7 +166,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync(\n new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n }\n);\n" + "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync(\n new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n }\n);\n" } }, { @@ -202,7 +202,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync(\n new NestedObjectWithOptionalField { String = null, NestedObject = null }\n);\n" + "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync(\n new NestedObjectWithOptionalField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n }\n);\n" } }, { @@ -214,7 +214,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsync(\n \"string\",\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n }\n);\n" + "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsync(\n \"string\",\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n }\n);\n" } }, { @@ -226,7 +226,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync(\n new List()\n {\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n },\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n },\n }\n);\n" + "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync(\n new List()\n {\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n },\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n },\n }\n);\n" } }, { @@ -418,7 +418,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.InlinedRequests;\nusing SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.InlinedRequests.PostWithObjectBodyandResponseAsync(\n new PostWithObjectBody\n {\n String = \"string\",\n Integer = 1,\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n }\n);\n" + "client": "using SeedExhaustive.InlinedRequests;\nusing SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.InlinedRequests.PostWithObjectBodyandResponseAsync(\n new PostWithObjectBody\n {\n String = \"string\",\n Integer = 1,\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n }\n);\n" } }, { diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs index afad3fe1690..08e979d2f86 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -16,7 +17,31 @@ public class GetAndReturnNestedWithOptionalFieldTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "string": "string", + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } + } """; const string mockResponse = """ @@ -63,7 +88,30 @@ public async Task MockServerTest() ); var response = await Client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync( - new NestedObjectWithOptionalField { String = null, NestedObject = null }, + new NestedObjectWithOptionalField + { + String = "string", + NestedObject = new ObjectWithOptionalField + { + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", + }, + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs index 8b96523521e..94315ceb11a 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -19,11 +20,53 @@ public async Task MockServerTest() [ { "string": "string", - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } }, { "string": "string", - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } } ] """; @@ -79,19 +122,23 @@ public async Task MockServerTest() String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, new NestedObjectWithRequiredField @@ -99,19 +146,23 @@ public async Task MockServerTest() String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, }, diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs index 8b2e1747d70..1b4d198ef16 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -18,7 +19,28 @@ public async Task MockServerTest() const string requestJson = """ { "string": "string", - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } } """; @@ -72,19 +94,23 @@ public async Task MockServerTest() String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, RequestOptions diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs index 380b36737b9..8e575a96aa0 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq; using NUnit.Framework; using SeedExhaustive.Core; +using SeedExhaustive.Types.Object; #nullable enable @@ -15,7 +16,9 @@ public class GetAndReturnOptionalTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - + { + "string": "string" + } """; const string mockResponse = """ @@ -30,7 +33,7 @@ public async Task MockServerTest() .RequestBuilders.Request.Create() .WithPath("/container/opt-objects") .UsingPost() - .WithBody(requestJson) + .WithBodyAsJson(requestJson) ) .RespondWith( WireMock @@ -40,7 +43,7 @@ public async Task MockServerTest() ); var response = await Client.Endpoints.Container.GetAndReturnOptionalAsync( - null, + new ObjectWithRequiredField { String = "string" }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs index a185e909b96..1e042cb060a 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -16,7 +17,28 @@ public class GetAndReturnWithOptionalFieldTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } """; const string mockResponse = """ @@ -62,19 +84,23 @@ public async Task MockServerTest() var response = await Client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync( new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, RequestOptions ); diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs index 452d65eba23..13e3df8a6d5 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -20,7 +21,28 @@ public async Task MockServerTest() { "string": "string", "integer": 1, - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } } """; @@ -71,19 +93,23 @@ public async Task MockServerTest() Integer = 1, NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, RequestOptions diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs index 5e911425ab2..bd992aa0124 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -16,7 +17,28 @@ public class TestPatchTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } """; const string mockResponse = """ @@ -63,19 +85,23 @@ public async Task MockServerTest() "id", new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, RequestOptions ); diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs index 353cdef7eec..322b0c713f4 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs @@ -298,7 +298,9 @@ public async Task< /// /// - /// await client.Endpoints.Container.GetAndReturnOptionalAsync(null); + /// await client.Endpoints.Container.GetAndReturnOptionalAsync( + /// new ObjectWithRequiredField { String = "string" } + /// ); /// /// public async Task GetAndReturnOptionalAsync( diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs index 8b8369cb917..e0eab29d1bf 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs @@ -153,19 +153,19 @@ public async Task TestPutAsync( /// "id", /// new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// } /// ); /// diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs index 8469555bb56..919c15bffa5 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs @@ -23,19 +23,19 @@ internal ObjectClient(RawClient client) /// await client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync( /// new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// } /// ); /// @@ -177,7 +177,26 @@ public async Task GetAndReturnWithMapOfMapAsync( /// /// /// await client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync( - /// new NestedObjectWithOptionalField { String = null, NestedObject = null } + /// new NestedObjectWithOptionalField + /// { + /// String = "string", + /// NestedObject = new ObjectWithOptionalField + /// { + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", + /// }, + /// } /// ); /// /// @@ -227,19 +246,19 @@ public async Task GetAndReturnNestedWithOptionalF /// String = "string", /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// } /// ); @@ -293,19 +312,19 @@ public async Task GetAndReturnNestedWithRequiredF /// String = "string", /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// }, /// new NestedObjectWithRequiredField @@ -313,19 +332,19 @@ public async Task GetAndReturnNestedWithRequiredF /// String = "string", /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// }, /// } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs index 4d531766814..5725be9a523 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs @@ -31,19 +31,19 @@ internal InlinedRequestsClient(RawClient client) /// Integer = 1, /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// } /// ); diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/reference.md b/seed/csharp-sdk/exhaustive/no-generate-error-types/reference.md index 090794a3709..66620f803a4 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/reference.md +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/reference.md @@ -275,7 +275,9 @@ await client.Endpoints.Container.GetAndReturnMapOfPrimToObjectAsync(
```csharp -await client.Endpoints.Container.GetAndReturnOptionalAsync(null); +await client.Endpoints.Container.GetAndReturnOptionalAsync( + new ObjectWithRequiredField { String = "string" } +); ```
@@ -492,19 +494,19 @@ await client.Endpoints.HttpMethods.TestPatchAsync( "id", new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", } ); ``` @@ -598,19 +600,19 @@ await client.Endpoints.HttpMethods.TestDeleteAsync("id"); await client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync( new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", } ); ``` @@ -746,7 +748,26 @@ await client.Endpoints.Object.GetAndReturnWithMapOfMapAsync( ```csharp await client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync( - new NestedObjectWithOptionalField { String = null, NestedObject = null } + new NestedObjectWithOptionalField + { + String = "string", + NestedObject = new ObjectWithOptionalField + { + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", + }, + } ); ``` @@ -794,19 +815,19 @@ await client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsync( String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, } ); @@ -865,19 +886,19 @@ await client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync( String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, new NestedObjectWithRequiredField @@ -885,19 +906,19 @@ await client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync( String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, } @@ -1659,19 +1680,19 @@ await client.InlinedRequests.PostWithObjectBodyandResponseAsync( Integer = 1, NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, } ); diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/snippet.json b/seed/csharp-sdk/exhaustive/no-generate-error-types/snippet.json index 99b4a9decd6..a30c894e3fe 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/snippet.json +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/snippet.json @@ -82,7 +82,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Container.GetAndReturnOptionalAsync(null);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Container.GetAndReturnOptionalAsync(\n new ObjectWithRequiredField { String = \"string\" }\n);\n" } }, { @@ -142,7 +142,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.HttpMethods.TestPatchAsync(\n \"id\",\n new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.HttpMethods.TestPatchAsync(\n \"id\",\n new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n }\n);\n" } }, { @@ -166,7 +166,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync(\n new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync(\n new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n }\n);\n" } }, { @@ -202,7 +202,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync(\n new NestedObjectWithOptionalField { String = null, NestedObject = null }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync(\n new NestedObjectWithOptionalField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n }\n);\n" } }, { @@ -214,7 +214,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsync(\n \"string\",\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsync(\n \"string\",\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n }\n);\n" } }, { @@ -226,7 +226,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync(\n new List()\n {\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n },\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n },\n }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync(\n new List()\n {\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n },\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n },\n }\n);\n" } }, { @@ -418,7 +418,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.InlinedRequests.PostWithObjectBodyandResponseAsync(\n new PostWithObjectBody\n {\n String = \"string\",\n Integer = 1,\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.InlinedRequests.PostWithObjectBodyandResponseAsync(\n new PostWithObjectBody\n {\n String = \"string\",\n Integer = 1,\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n }\n);\n" } }, { diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs index 8ef208a7490..e50ddbaaf87 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -16,7 +17,31 @@ public class GetAndReturnNestedWithOptionalFieldTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "string": "string", + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } + } """; const string mockResponse = """ @@ -63,7 +88,30 @@ public async Task MockServerTest() ); var response = await Client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync( - new NestedObjectWithOptionalField { String = null, NestedObject = null }, + new NestedObjectWithOptionalField + { + String = "string", + NestedObject = new ObjectWithOptionalField + { + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", + }, + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs index 9bdc5e2c6ea..5a01880f039 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -19,11 +20,53 @@ public async Task MockServerTest() [ { "string": "string", - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } }, { "string": "string", - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } } ] """; @@ -79,19 +122,23 @@ public async Task MockServerTest() String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, new NestedObjectWithRequiredField @@ -99,19 +146,23 @@ public async Task MockServerTest() String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, }, diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs index 93b5faa54ee..e1970a6f144 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -18,7 +19,28 @@ public async Task MockServerTest() const string requestJson = """ { "string": "string", - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } } """; @@ -72,19 +94,23 @@ public async Task MockServerTest() String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, RequestOptions diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs index 380b36737b9..f06ee4936f3 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq; using NUnit.Framework; using SeedExhaustive.Core; +using SeedExhaustive.Types; #nullable enable @@ -15,7 +16,9 @@ public class GetAndReturnOptionalTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - + { + "string": "string" + } """; const string mockResponse = """ @@ -30,7 +33,7 @@ public async Task MockServerTest() .RequestBuilders.Request.Create() .WithPath("/container/opt-objects") .UsingPost() - .WithBody(requestJson) + .WithBodyAsJson(requestJson) ) .RespondWith( WireMock @@ -40,7 +43,7 @@ public async Task MockServerTest() ); var response = await Client.Endpoints.Container.GetAndReturnOptionalAsync( - null, + new ObjectWithRequiredField { String = "string" }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs index 9aaa0b40da4..68fcf98506b 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -16,7 +17,28 @@ public class GetAndReturnWithOptionalFieldTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } """; const string mockResponse = """ @@ -62,19 +84,23 @@ public async Task MockServerTest() var response = await Client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync( new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, RequestOptions ); diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs index 6f50f9fea24..17d707fd085 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -20,7 +21,28 @@ public async Task MockServerTest() { "string": "string", "integer": 1, - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } } """; @@ -71,19 +93,23 @@ public async Task MockServerTest() Integer = 1, NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, RequestOptions diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs index 83152bae271..a5a295e3e95 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -16,7 +17,28 @@ public class TestPatchTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } """; const string mockResponse = """ @@ -63,19 +85,23 @@ public async Task MockServerTest() "id", new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, RequestOptions ); diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs index 36fe3134bf3..1bec750ed6b 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs @@ -298,7 +298,9 @@ public async Task< /// /// - /// await client.Endpoints.Container.GetAndReturnOptionalAsync(null); + /// await client.Endpoints.Container.GetAndReturnOptionalAsync( + /// new ObjectWithRequiredField { String = "string" } + /// ); /// /// public async Task GetAndReturnOptionalAsync( diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs index 094e7ee6ee6..39b72149ef1 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs @@ -153,19 +153,19 @@ public async Task TestPutAsync( /// "id", /// new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// } /// ); /// diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs index 7da1e4b67af..198d63cf81c 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs @@ -23,19 +23,19 @@ internal ObjectClient(RawClient client) /// await client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync( /// new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// } /// ); /// @@ -177,7 +177,26 @@ public async Task GetAndReturnWithMapOfMapAsync( /// /// /// await client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync( - /// new NestedObjectWithOptionalField { String = null, NestedObject = null } + /// new NestedObjectWithOptionalField + /// { + /// String = "string", + /// NestedObject = new ObjectWithOptionalField + /// { + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", + /// }, + /// } /// ); /// /// @@ -227,19 +246,19 @@ public async Task GetAndReturnNestedWithOptionalF /// String = "string", /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// } /// ); @@ -293,19 +312,19 @@ public async Task GetAndReturnNestedWithRequiredF /// String = "string", /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// }, /// new NestedObjectWithRequiredField @@ -313,19 +332,19 @@ public async Task GetAndReturnNestedWithRequiredF /// String = "string", /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// }, /// } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs index 6aee36918e8..0f45980a80e 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs @@ -29,19 +29,19 @@ internal InlinedRequestsClient(RawClient client) /// Integer = 1, /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// } /// ); diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/reference.md b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/reference.md index 090794a3709..66620f803a4 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/reference.md +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/reference.md @@ -275,7 +275,9 @@ await client.Endpoints.Container.GetAndReturnMapOfPrimToObjectAsync(
```csharp -await client.Endpoints.Container.GetAndReturnOptionalAsync(null); +await client.Endpoints.Container.GetAndReturnOptionalAsync( + new ObjectWithRequiredField { String = "string" } +); ```
@@ -492,19 +494,19 @@ await client.Endpoints.HttpMethods.TestPatchAsync( "id", new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", } ); ``` @@ -598,19 +600,19 @@ await client.Endpoints.HttpMethods.TestDeleteAsync("id"); await client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync( new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", } ); ``` @@ -746,7 +748,26 @@ await client.Endpoints.Object.GetAndReturnWithMapOfMapAsync( ```csharp await client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync( - new NestedObjectWithOptionalField { String = null, NestedObject = null } + new NestedObjectWithOptionalField + { + String = "string", + NestedObject = new ObjectWithOptionalField + { + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", + }, + } ); ``` @@ -794,19 +815,19 @@ await client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsync( String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, } ); @@ -865,19 +886,19 @@ await client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync( String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, new NestedObjectWithRequiredField @@ -885,19 +906,19 @@ await client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync( String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, } @@ -1659,19 +1680,19 @@ await client.InlinedRequests.PostWithObjectBodyandResponseAsync( Integer = 1, NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, } ); diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/snippet.json b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/snippet.json index 99b4a9decd6..a30c894e3fe 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/snippet.json +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/snippet.json @@ -82,7 +82,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Container.GetAndReturnOptionalAsync(null);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Container.GetAndReturnOptionalAsync(\n new ObjectWithRequiredField { String = \"string\" }\n);\n" } }, { @@ -142,7 +142,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.HttpMethods.TestPatchAsync(\n \"id\",\n new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.HttpMethods.TestPatchAsync(\n \"id\",\n new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n }\n);\n" } }, { @@ -166,7 +166,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync(\n new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync(\n new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n }\n);\n" } }, { @@ -202,7 +202,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync(\n new NestedObjectWithOptionalField { String = null, NestedObject = null }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync(\n new NestedObjectWithOptionalField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n }\n);\n" } }, { @@ -214,7 +214,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsync(\n \"string\",\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsync(\n \"string\",\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n }\n);\n" } }, { @@ -226,7 +226,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync(\n new List()\n {\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n },\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n },\n }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsListAsync(\n new List()\n {\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n },\n new NestedObjectWithRequiredField\n {\n String = \"string\",\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n },\n }\n);\n" } }, { @@ -418,7 +418,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.InlinedRequests.PostWithObjectBodyandResponseAsync(\n new PostWithObjectBody\n {\n String = \"string\",\n Integer = 1,\n NestedObject = new ObjectWithOptionalField\n {\n String = null,\n Integer = null,\n Long = null,\n Double = null,\n Bool = null,\n Datetime = null,\n Date = null,\n Uuid = null,\n Base64 = null,\n List = null,\n Set = null,\n Map = null,\n Bigint = null,\n },\n }\n);\n" + "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.InlinedRequests.PostWithObjectBodyandResponseAsync(\n new PostWithObjectBody\n {\n String = \"string\",\n Integer = 1,\n NestedObject = new ObjectWithOptionalField\n {\n String = \"string\",\n Integer = 1,\n Long = 1000000,\n Double = 1.1,\n Bool = true,\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Date = new DateOnly(2023, 1, 15),\n Uuid = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n Base64 = \"SGVsbG8gd29ybGQh\",\n List = new List() { \"list\", \"list\" },\n Set = new HashSet() { \"set\" },\n Map = new Dictionary() { { 1, \"map\" } },\n Bigint = \"1000000\",\n },\n }\n);\n" } }, { diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs index 8ef208a7490..e50ddbaaf87 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithOptionalFieldTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -16,7 +17,31 @@ public class GetAndReturnNestedWithOptionalFieldTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "string": "string", + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } + } """; const string mockResponse = """ @@ -63,7 +88,30 @@ public async Task MockServerTest() ); var response = await Client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync( - new NestedObjectWithOptionalField { String = null, NestedObject = null }, + new NestedObjectWithOptionalField + { + String = "string", + NestedObject = new ObjectWithOptionalField + { + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", + }, + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs index 9bdc5e2c6ea..5a01880f039 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldAsListTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -19,11 +20,53 @@ public async Task MockServerTest() [ { "string": "string", - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } }, { "string": "string", - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } } ] """; @@ -79,19 +122,23 @@ public async Task MockServerTest() String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, new NestedObjectWithRequiredField @@ -99,19 +146,23 @@ public async Task MockServerTest() String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, }, diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs index 93b5faa54ee..e1970a6f144 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnNestedWithRequiredFieldTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -18,7 +19,28 @@ public async Task MockServerTest() const string requestJson = """ { "string": "string", - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } } """; @@ -72,19 +94,23 @@ public async Task MockServerTest() String = "string", NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, RequestOptions diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs index 380b36737b9..f06ee4936f3 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnOptionalTest.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq; using NUnit.Framework; using SeedExhaustive.Core; +using SeedExhaustive.Types; #nullable enable @@ -15,7 +16,9 @@ public class GetAndReturnOptionalTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - + { + "string": "string" + } """; const string mockResponse = """ @@ -30,7 +33,7 @@ public async Task MockServerTest() .RequestBuilders.Request.Create() .WithPath("/container/opt-objects") .UsingPost() - .WithBody(requestJson) + .WithBodyAsJson(requestJson) ) .RespondWith( WireMock @@ -40,7 +43,7 @@ public async Task MockServerTest() ); var response = await Client.Endpoints.Container.GetAndReturnOptionalAsync( - null, + new ObjectWithRequiredField { String = "string" }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs index 9aaa0b40da4..68fcf98506b 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/GetAndReturnWithOptionalFieldTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -16,7 +17,28 @@ public class GetAndReturnWithOptionalFieldTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } """; const string mockResponse = """ @@ -62,19 +84,23 @@ public async Task MockServerTest() var response = await Client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync( new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, RequestOptions ); diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs index 6f50f9fea24..17d707fd085 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/PostWithObjectBodyandResponseTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -20,7 +21,28 @@ public async Task MockServerTest() { "string": "string", "integer": 1, - "NestedObject": {} + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } } """; @@ -71,19 +93,23 @@ public async Task MockServerTest() Integer = 1, NestedObject = new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, }, RequestOptions diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs index 83152bae271..a5a295e3e95 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/TestPatchTest.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Threading.Tasks; using FluentAssertions.Json; using Newtonsoft.Json.Linq; @@ -16,7 +17,28 @@ public class TestPatchTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": true, + "datetime": "2024-01-15T09:30:00.000Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": [ + "list", + "list" + ], + "set": [ + "set" + ], + "map": { + "1": "map" + }, + "bigint": "1000000" + } """; const string mockResponse = """ @@ -63,19 +85,23 @@ public async Task MockServerTest() "id", new ObjectWithOptionalField { - String = null, - Integer = null, - Long = null, - Double = null, - Bool = null, - Datetime = null, - Date = null, - Uuid = null, - Base64 = null, - List = null, - Set = null, - Map = null, - Bigint = null, + String = "string", + Integer = 1, + Long = 1000000, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), + Date = new DateOnly(2023, 1, 15), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List() { "list", "list" }, + Set = new HashSet() { "set" }, + Map = new Dictionary() { { 1, "map" } }, + Bigint = "1000000", }, RequestOptions ); diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs index 6548c6637c4..95820ec2ced 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs @@ -297,7 +297,9 @@ public async Task< /// /// - /// await client.Endpoints.Container.GetAndReturnOptionalAsync(null); + /// await client.Endpoints.Container.GetAndReturnOptionalAsync( + /// new ObjectWithRequiredField { String = "string" } + /// ); /// /// public async Task GetAndReturnOptionalAsync( diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs index 82abf9da82d..37b2160080a 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs @@ -152,19 +152,19 @@ public async Task TestPutAsync( /// "id", /// new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// } /// ); /// diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs index 824f5c4c05a..0b1d8a8a92b 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs @@ -22,19 +22,19 @@ internal ObjectClient(RawClient client) /// await client.Endpoints.Object.GetAndReturnWithOptionalFieldAsync( /// new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// } /// ); /// @@ -176,7 +176,26 @@ public async Task GetAndReturnWithMapOfMapAsync( /// /// /// await client.Endpoints.Object.GetAndReturnNestedWithOptionalFieldAsync( - /// new NestedObjectWithOptionalField { String = null, NestedObject = null } + /// new NestedObjectWithOptionalField + /// { + /// String = "string", + /// NestedObject = new ObjectWithOptionalField + /// { + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", + /// }, + /// } /// ); /// /// @@ -226,19 +245,19 @@ public async Task GetAndReturnNestedWithOptionalF /// String = "string", /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// } /// ); @@ -292,19 +311,19 @@ public async Task GetAndReturnNestedWithRequiredF /// String = "string", /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// }, /// new NestedObjectWithRequiredField @@ -312,19 +331,19 @@ public async Task GetAndReturnNestedWithRequiredF /// String = "string", /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// }, /// } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs index 9ff3f30a617..86594b31c4f 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs @@ -29,19 +29,19 @@ internal InlinedRequestsClient(RawClient client) /// Integer = 1, /// NestedObject = new ObjectWithOptionalField /// { - /// String = null, - /// Integer = null, - /// Long = null, - /// Double = null, - /// Bool = null, - /// Datetime = null, - /// Date = null, - /// Uuid = null, - /// Base64 = null, - /// List = null, - /// Set = null, - /// Map = null, - /// Bigint = null, + /// String = "string", + /// Integer = 1, + /// Long = 1000000, + /// Double = 1.1, + /// Bool = true, + /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// Date = new DateOnly(2023, 1, 15), + /// Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + /// Base64 = "SGVsbG8gd29ybGQh", + /// List = new List<string>() { "list", "list" }, + /// Set = new HashSet<string>() { "set" }, + /// Map = new Dictionary<int, string>() { { 1, "map" } }, + /// Bigint = "1000000", /// }, /// } /// ); diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml +++ b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/openapi/openapi.yml b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/README.md b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/README.md index a605ad810d0..fb7a6d7b883 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/README.md +++ b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/README.md @@ -18,20 +18,8 @@ Instantiate and use the client with the following: ```csharp using SeedApi; -var client = new SeedApiClient(); -await client.Dataservice.UploadAsync( - new UploadRequest - { - Columns = new List() - { - new Column - { - Id = "id", - Values = new List() { 1.1f }, - }, - }, - } -); +var client = new SeedApiClient("API_KEY"); +await client.Dataservice.FooAsync(); ``` ## Exception Handling @@ -43,7 +31,7 @@ will be thrown. using SeedApi; try { - var response = await client.Dataservice.UploadAsync(...); + var response = await client.Dataservice.FooAsync(...); } catch (SeedApiApiException e) { System.Console.WriteLine(e.Body); System.Console.WriteLine(e.StatusCode); @@ -67,7 +55,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret Use the `MaxRetries` request option to configure this behavior. ```csharp -var response = await client.Dataservice.UploadAsync( +var response = await client.Dataservice.FooAsync( ..., new RequestOptions { MaxRetries: 0 // Override MaxRetries at the request level @@ -80,7 +68,7 @@ var response = await client.Dataservice.UploadAsync( The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. ```csharp -var response = await client.Dataservice.UploadAsync( +var response = await client.Dataservice.FooAsync( ..., new RequestOptions { Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/reference.md b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/reference.md index 830bacdc726..b5e56eaf804 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/reference.md +++ b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/reference.md @@ -1,5 +1,30 @@ # Reference ## DataService +
client.Dataservice.FooAsync() -> object +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Dataservice.FooAsync(); +``` +
+
+
+
+ + +
+
+
+
client.Dataservice.UploadAsync(UploadRequest { ... }) -> UploadResponse
diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet.json b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet.json index 546b49b57ee..9a76a063ec4 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet.json +++ b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet.json @@ -1,6 +1,18 @@ { "types": {}, "endpoints": [ + { + "example_identifier": null, + "id": { + "path": "/foo", + "method": "POST", + "identifier_override": "endpoint_dataservice.foo" + }, + "snippet": { + "type": "typescript", + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.FooAsync();\n" + } + }, { "example_identifier": null, "id": { @@ -10,7 +22,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UploadAsync(\n new UploadRequest\n {\n Columns = new List()\n {\n new Column\n {\n Id = \"id\",\n Values = new List() { 1.1f },\n },\n },\n }\n);\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.UploadAsync(\n new UploadRequest\n {\n Columns = new List()\n {\n new Column\n {\n Id = \"id\",\n Values = new List() { 1.1f },\n },\n },\n }\n);\n" } }, { @@ -22,7 +34,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DeleteAsync(new DeleteRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.DeleteAsync(new DeleteRequest());\n" } }, { @@ -34,7 +46,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DescribeAsync(new DescribeRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.DescribeAsync(new DescribeRequest());\n" } }, { @@ -46,7 +58,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.FetchAsync(new FetchRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.FetchAsync(new FetchRequest());\n" } }, { @@ -58,7 +70,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.ListAsync(new ListRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.ListAsync(new ListRequest());\n" } }, { @@ -70,7 +82,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 });\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 });\n" } }, { @@ -82,7 +94,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UpdateAsync(new UpdateRequest { Id = \"id\" });\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.UpdateAsync(new UpdateRequest { Id = \"id\" });\n" } } ] diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/ClientOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/ClientOptions.cs index e4f22c22965..b3264cb28bb 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/ClientOptions.cs +++ b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/ClientOptions.cs @@ -12,7 +12,7 @@ public partial class ClientOptions /// /// The Base URL for the API. /// - public string BaseUrl { get; init; } = ""; + public string BaseUrl { get; init; } = SeedApiEnvironment.Default; /// /// The http client used to make requests. diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiEnvironment.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiEnvironment.cs new file mode 100644 index 00000000000..14ffe5ab6c8 --- /dev/null +++ b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiEnvironment.cs @@ -0,0 +1,6 @@ +namespace SeedApi; + +public class SeedApiEnvironment +{ + public static string Default = "https://localhost"; +} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/DataserviceClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/DataserviceClient.cs index 8da06ffed93..fd876a03711 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/DataserviceClient.cs +++ b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/DataserviceClient.cs @@ -22,6 +22,41 @@ internal DataserviceClient(RawClient client) _dataService = new DataService.DataServiceClient(_grpc.Channel); } + /// + /// + /// await client.Dataservice.FooAsync(); + /// + /// + public async Task FooAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + try + { + var callOptions = _grpc.CreateCallOptions( + options ?? new GrpcRequestOptions(), + cancellationToken + ); + var call = _dataService.FooAsync(null, callOptions); + var response = await call.ConfigureAwait(false); + return object.FromProto(response); + } + catch (RpcException rpc) + { + var statusCode = (int)rpc.StatusCode; + throw new SeedApiApiException( + $"Error with gRPC status code {statusCode}", + statusCode, + rpc.Message + ); + } + catch (Exception e) + { + throw new SeedApiException("Error", e); + } + } + /// /// /// await client.Dataservice.UploadAsync( diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApiClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApiClient.cs index 017ab8726ca..a079df6c315 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApiClient.cs +++ b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApiClient.cs @@ -8,7 +8,7 @@ public partial class SeedApiClient { private RawClient _client; - public SeedApiClient(ClientOptions? clientOptions = null) + public SeedApiClient(string apiKey, ClientOptions? clientOptions = null) { var defaultHeaders = new Headers( new Dictionary() diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/generators.yml b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/generators.yml +++ b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/openapi/openapi.yml b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/README.md b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/README.md index 605573c3e5f..a9db3110199 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/README.md +++ b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/README.md @@ -18,20 +18,8 @@ Instantiate and use the client with the following: ```csharp using SeedApi; -var client = new SeedApiClient(); -await client.Dataservice.UploadAsync( - new UploadRequest - { - Columns = new List() - { - new Column - { - Id = "id", - Values = new List() { 1.1f }, - }, - }, - } -); +var client = new SeedApiClient("API_KEY"); +await client.Dataservice.FooAsync(); ``` ## Exception Handling @@ -43,7 +31,7 @@ will be thrown. using SeedApi; try { - var response = await client.Dataservice.UploadAsync(...); + var response = await client.Dataservice.FooAsync(...); } catch (SeedApiApiException e) { System.Console.WriteLine(e.Body); System.Console.WriteLine(e.StatusCode); @@ -67,7 +55,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret Use the `MaxRetries` request option to configure this behavior. ```csharp -var response = await client.Dataservice.UploadAsync( +var response = await client.Dataservice.FooAsync( ..., new RequestOptions { MaxRetries: 0 // Override MaxRetries at the request level @@ -80,7 +68,7 @@ var response = await client.Dataservice.UploadAsync( The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. ```csharp -var response = await client.Dataservice.UploadAsync( +var response = await client.Dataservice.FooAsync( ..., new RequestOptions { Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/reference.md b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/reference.md index 830bacdc726..b5e56eaf804 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/reference.md +++ b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/reference.md @@ -1,5 +1,30 @@ # Reference ## DataService +
client.Dataservice.FooAsync() -> object +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Dataservice.FooAsync(); +``` +
+
+
+
+ + +
+
+
+
client.Dataservice.UploadAsync(UploadRequest { ... }) -> UploadResponse
diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet.json b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet.json index 546b49b57ee..9a76a063ec4 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet.json +++ b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet.json @@ -1,6 +1,18 @@ { "types": {}, "endpoints": [ + { + "example_identifier": null, + "id": { + "path": "/foo", + "method": "POST", + "identifier_override": "endpoint_dataservice.foo" + }, + "snippet": { + "type": "typescript", + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.FooAsync();\n" + } + }, { "example_identifier": null, "id": { @@ -10,7 +22,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UploadAsync(\n new UploadRequest\n {\n Columns = new List()\n {\n new Column\n {\n Id = \"id\",\n Values = new List() { 1.1f },\n },\n },\n }\n);\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.UploadAsync(\n new UploadRequest\n {\n Columns = new List()\n {\n new Column\n {\n Id = \"id\",\n Values = new List() { 1.1f },\n },\n },\n }\n);\n" } }, { @@ -22,7 +34,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DeleteAsync(new DeleteRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.DeleteAsync(new DeleteRequest());\n" } }, { @@ -34,7 +46,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DescribeAsync(new DescribeRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.DescribeAsync(new DescribeRequest());\n" } }, { @@ -46,7 +58,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.FetchAsync(new FetchRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.FetchAsync(new FetchRequest());\n" } }, { @@ -58,7 +70,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.ListAsync(new ListRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.ListAsync(new ListRequest());\n" } }, { @@ -70,7 +82,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 });\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 });\n" } }, { @@ -82,7 +94,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UpdateAsync(new UpdateRequest { Id = \"id\" });\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.UpdateAsync(new UpdateRequest { Id = \"id\" });\n" } } ] diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/ClientOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/ClientOptions.cs index e4f22c22965..b3264cb28bb 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/ClientOptions.cs +++ b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/ClientOptions.cs @@ -12,7 +12,7 @@ public partial class ClientOptions /// /// The Base URL for the API. /// - public string BaseUrl { get; init; } = ""; + public string BaseUrl { get; init; } = SeedApiEnvironment.Default; /// /// The http client used to make requests. diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiEnvironment.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiEnvironment.cs new file mode 100644 index 00000000000..14ffe5ab6c8 --- /dev/null +++ b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiEnvironment.cs @@ -0,0 +1,6 @@ +namespace SeedApi; + +public class SeedApiEnvironment +{ + public static string Default = "https://localhost"; +} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/DataserviceClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/DataserviceClient.cs index 8da06ffed93..fd876a03711 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/DataserviceClient.cs +++ b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/DataserviceClient.cs @@ -22,6 +22,41 @@ internal DataserviceClient(RawClient client) _dataService = new DataService.DataServiceClient(_grpc.Channel); } + /// + /// + /// await client.Dataservice.FooAsync(); + /// + /// + public async Task FooAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + try + { + var callOptions = _grpc.CreateCallOptions( + options ?? new GrpcRequestOptions(), + cancellationToken + ); + var call = _dataService.FooAsync(null, callOptions); + var response = await call.ConfigureAwait(false); + return object.FromProto(response); + } + catch (RpcException rpc) + { + var statusCode = (int)rpc.StatusCode; + throw new SeedApiApiException( + $"Error with gRPC status code {statusCode}", + statusCode, + rpc.Message + ); + } + catch (Exception e) + { + throw new SeedApiException("Error", e); + } + } + /// /// /// await client.Dataservice.UploadAsync( diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApiClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApiClient.cs index 017ab8726ca..a079df6c315 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApiClient.cs +++ b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApiClient.cs @@ -8,7 +8,7 @@ public partial class SeedApiClient { private RawClient _client; - public SeedApiClient(ClientOptions? clientOptions = null) + public SeedApiClient(string apiKey, ClientOptions? clientOptions = null) { var defaultHeaders = new Headers( new Dictionary() diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml +++ b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/openapi/openapi.yml b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/README.md b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/README.md index d7cbceedb96..fb7a6d7b883 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/README.md +++ b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/README.md @@ -18,16 +18,8 @@ Instantiate and use the client with the following: ```csharp using SeedApi; -var client = new SeedApiClient(); -await client.Dataservice.UploadAsync( - new UploadRequest - { - Columns = new List() - { - new Column { Id = "id", Values = new[] { 1.1f } }, - }, - } -); +var client = new SeedApiClient("API_KEY"); +await client.Dataservice.FooAsync(); ``` ## Exception Handling @@ -39,7 +31,7 @@ will be thrown. using SeedApi; try { - var response = await client.Dataservice.UploadAsync(...); + var response = await client.Dataservice.FooAsync(...); } catch (SeedApiApiException e) { System.Console.WriteLine(e.Body); System.Console.WriteLine(e.StatusCode); @@ -63,7 +55,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret Use the `MaxRetries` request option to configure this behavior. ```csharp -var response = await client.Dataservice.UploadAsync( +var response = await client.Dataservice.FooAsync( ..., new RequestOptions { MaxRetries: 0 // Override MaxRetries at the request level @@ -76,7 +68,7 @@ var response = await client.Dataservice.UploadAsync( The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. ```csharp -var response = await client.Dataservice.UploadAsync( +var response = await client.Dataservice.FooAsync( ..., new RequestOptions { Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/reference.md b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/reference.md index b5cdd6e8580..e862902bd0f 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/reference.md +++ b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/reference.md @@ -1,5 +1,30 @@ # Reference ## DataService +
client.Dataservice.FooAsync() -> object +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Dataservice.FooAsync(); +``` +
+
+
+
+ + +
+
+
+
client.Dataservice.UploadAsync(UploadRequest { ... }) -> UploadResponse
diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet.json b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet.json index 66926a40e09..062bf9a5e73 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet.json +++ b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet.json @@ -1,6 +1,18 @@ { "types": {}, "endpoints": [ + { + "example_identifier": null, + "id": { + "path": "/foo", + "method": "POST", + "identifier_override": "endpoint_dataservice.foo" + }, + "snippet": { + "type": "typescript", + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.FooAsync();\n" + } + }, { "example_identifier": null, "id": { @@ -10,7 +22,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UploadAsync(\n new UploadRequest\n {\n Columns = new List()\n {\n new Column { Id = \"id\", Values = new[] { 1.1f } },\n },\n }\n);\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.UploadAsync(\n new UploadRequest\n {\n Columns = new List()\n {\n new Column { Id = \"id\", Values = new[] { 1.1f } },\n },\n }\n);\n" } }, { @@ -22,7 +34,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DeleteAsync(new DeleteRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.DeleteAsync(new DeleteRequest());\n" } }, { @@ -34,7 +46,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DescribeAsync(new DescribeRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.DescribeAsync(new DescribeRequest());\n" } }, { @@ -46,7 +58,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.FetchAsync(new FetchRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.FetchAsync(new FetchRequest());\n" } }, { @@ -58,7 +70,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.ListAsync(new ListRequest());\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.ListAsync(new ListRequest());\n" } }, { @@ -70,7 +82,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 });\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 });\n" } }, { @@ -82,7 +94,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UpdateAsync(new UpdateRequest { Id = \"id\" });\n" + "client": "using SeedApi;\n\nvar client = new SeedApiClient(\"API_KEY\");\nawait client.Dataservice.UpdateAsync(new UpdateRequest { Id = \"id\" });\n" } } ] diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/ClientOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/ClientOptions.cs index e4f22c22965..b3264cb28bb 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/ClientOptions.cs +++ b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/ClientOptions.cs @@ -12,7 +12,7 @@ public partial class ClientOptions /// /// The Base URL for the API. /// - public string BaseUrl { get; init; } = ""; + public string BaseUrl { get; init; } = SeedApiEnvironment.Default; /// /// The http client used to make requests. diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiEnvironment.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiEnvironment.cs new file mode 100644 index 00000000000..14ffe5ab6c8 --- /dev/null +++ b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiEnvironment.cs @@ -0,0 +1,6 @@ +namespace SeedApi; + +public class SeedApiEnvironment +{ + public static string Default = "https://localhost"; +} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/DataserviceClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/DataserviceClient.cs index 9c85dcc2d0e..30a2cfcf383 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/DataserviceClient.cs +++ b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/DataserviceClient.cs @@ -22,6 +22,41 @@ internal DataserviceClient(RawClient client) _dataService = new DataService.DataServiceClient(_grpc.Channel); } + /// + /// + /// await client.Dataservice.FooAsync(); + /// + /// + public async Task FooAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + try + { + var callOptions = _grpc.CreateCallOptions( + options ?? new GrpcRequestOptions(), + cancellationToken + ); + var call = _dataService.FooAsync(null, callOptions); + var response = await call.ConfigureAwait(false); + return object.FromProto(response); + } + catch (RpcException rpc) + { + var statusCode = (int)rpc.StatusCode; + throw new SeedApiApiException( + $"Error with gRPC status code {statusCode}", + statusCode, + rpc.Message + ); + } + catch (Exception e) + { + throw new SeedApiException("Error", e); + } + } + /// /// /// await client.Dataservice.UploadAsync( diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApiClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApiClient.cs index 017ab8726ca..a079df6c315 100644 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApiClient.cs +++ b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApiClient.cs @@ -8,7 +8,7 @@ public partial class SeedApiClient { private RawClient _client; - public SeedApiClient(ClientOptions? clientOptions = null) + public SeedApiClient(string apiKey, ClientOptions? clientOptions = null) { var defaultHeaders = new Headers( new Dictionary() diff --git a/seed/csharp-sdk/literal/src/SeedLiteral.Test/Unit/MockServer/SendTest.cs b/seed/csharp-sdk/literal/src/SeedLiteral.Test/Unit/MockServer/SendTest.cs index cfe3bb8b2bb..9cef472b3a9 100644 --- a/seed/csharp-sdk/literal/src/SeedLiteral.Test/Unit/MockServer/SendTest.cs +++ b/seed/csharp-sdk/literal/src/SeedLiteral.Test/Unit/MockServer/SendTest.cs @@ -21,6 +21,7 @@ public async Task MockServerTest_1() "query": "query", "stream": false, "context": "You're super wise", + "maybeContext": "You're super wise", "containerObject": { "nestedObjects": [ { @@ -68,7 +69,7 @@ public async Task MockServerTest_1() Query = "query", Stream = false, Context = "You're super wise", - MaybeContext = null, + MaybeContext = "You're super wise", ContainerObject = new ContainerObject { NestedObjects = new List() diff --git a/seed/csharp-sdk/mixed-case/.mock/definition/service.yml b/seed/csharp-sdk/mixed-case/.mock/definition/service.yml index 5991572a42f..7a38e853c35 100644 --- a/seed/csharp-sdk/mixed-case/.mock/definition/service.yml +++ b/seed/csharp-sdk/mixed-case/.mock/definition/service.yml @@ -56,6 +56,7 @@ types: Organization: Organization examples: - value: + status: ACTIVE resource_type: user userName: username metadata_tags: @@ -80,6 +81,7 @@ service: ResourceID: "rsc-xyz" response: body: + status: ACTIVE resource_type: user userName: username metadata_tags: @@ -106,6 +108,7 @@ service: response: body: - resource_type: user + status: ACTIVE userName: username metadata_tags: - tag1 diff --git a/seed/csharp-sdk/mixed-file-directory/reference.md b/seed/csharp-sdk/mixed-file-directory/reference.md index 77a5c62a766..317352cdf46 100644 --- a/seed/csharp-sdk/mixed-file-directory/reference.md +++ b/seed/csharp-sdk/mixed-file-directory/reference.md @@ -82,7 +82,7 @@ List all users.
```csharp -await client.User.ListAsync(new ListUsersRequest()); +await client.User.ListAsync(new ListUsersRequest { Limit = 1 }); ```
@@ -137,7 +137,7 @@ List all user events.
```csharp -await client.User.Events.ListEventsAsync(new ListUserEventsRequest()); +await client.User.Events.ListEventsAsync(new ListUserEventsRequest { Limit = 1 }); ```
diff --git a/seed/csharp-sdk/mixed-file-directory/snippet.json b/seed/csharp-sdk/mixed-file-directory/snippet.json index 9b6f4459a8b..eab14b713e6 100644 --- a/seed/csharp-sdk/mixed-file-directory/snippet.json +++ b/seed/csharp-sdk/mixed-file-directory/snippet.json @@ -22,7 +22,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedMixedFileDirectory;\n\nvar client = new SeedMixedFileDirectoryClient();\nawait client.User.ListAsync(new ListUsersRequest());\n" + "client": "using SeedMixedFileDirectory;\n\nvar client = new SeedMixedFileDirectoryClient();\nawait client.User.ListAsync(new ListUsersRequest { Limit = 1 });\n" } }, { @@ -34,7 +34,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedMixedFileDirectory.User;\nusing SeedMixedFileDirectory;\n\nvar client = new SeedMixedFileDirectoryClient();\nawait client.User.Events.ListEventsAsync(new ListUserEventsRequest());\n" + "client": "using SeedMixedFileDirectory.User;\nusing SeedMixedFileDirectory;\n\nvar client = new SeedMixedFileDirectoryClient();\nawait client.User.Events.ListEventsAsync(new ListUserEventsRequest { Limit = 1 });\n" } }, { diff --git a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/ListEventsTest.cs b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/ListEventsTest.cs index d95f06a8c22..66ce0e2c1cf 100644 --- a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/ListEventsTest.cs +++ b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/ListEventsTest.cs @@ -29,7 +29,13 @@ public async Task MockServerTest() """; Server - .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users/events/").UsingGet()) + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users/events/") + .WithParam("limit", "1") + .UsingGet() + ) .RespondWith( WireMock .ResponseBuilders.Response.Create() @@ -38,7 +44,7 @@ public async Task MockServerTest() ); var response = await Client.User.Events.ListEventsAsync( - new ListUserEventsRequest(), + new ListUserEventsRequest { Limit = 1 }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/ListTest.cs b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/ListTest.cs index bb9194c10a8..b349eae73f7 100644 --- a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/ListTest.cs +++ b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/ListTest.cs @@ -31,7 +31,13 @@ public async Task MockServerTest() """; Server - .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users/").UsingGet()) + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users/") + .WithParam("limit", "1") + .UsingGet() + ) .RespondWith( WireMock .ResponseBuilders.Response.Create() @@ -39,7 +45,10 @@ public async Task MockServerTest() .WithBody(mockResponse) ); - var response = await Client.User.ListAsync(new ListUsersRequest(), RequestOptions); + var response = await Client.User.ListAsync( + new ListUsersRequest { Limit = 1 }, + RequestOptions + ); JToken .Parse(mockResponse) .Should() diff --git a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/User/Events/EventsClient.cs b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/User/Events/EventsClient.cs index a4329d391d5..8730001c7fa 100644 --- a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/User/Events/EventsClient.cs +++ b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/User/Events/EventsClient.cs @@ -26,7 +26,7 @@ internal EventsClient(RawClient client) /// /// /// - /// await client.User.Events.ListEventsAsync(new ListUserEventsRequest()); + /// await client.User.Events.ListEventsAsync(new ListUserEventsRequest { Limit = 1 }); /// /// public async Task> ListEventsAsync( diff --git a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/User/UserClient.cs b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/User/UserClient.cs index c2d4312af63..c4866333fb5 100644 --- a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/User/UserClient.cs +++ b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/User/UserClient.cs @@ -25,7 +25,7 @@ internal UserClient(RawClient client) /// /// /// - /// await client.User.ListAsync(new ListUsersRequest()); + /// await client.User.ListAsync(new ListUsersRequest { Limit = 1 }); /// /// public async Task> ListAsync( diff --git a/seed/csharp-sdk/multi-line-docs/README.md b/seed/csharp-sdk/multi-line-docs/README.md index d70e7cd7051..3ab40813aea 100644 --- a/seed/csharp-sdk/multi-line-docs/README.md +++ b/seed/csharp-sdk/multi-line-docs/README.md @@ -19,7 +19,7 @@ Instantiate and use the client with the following: using SeedMultiLineDocs; var client = new SeedMultiLineDocsClient(); -await client.User.CreateUserAsync(new CreateUserRequest { Name = "name", Age = null }); +await client.User.CreateUserAsync(new CreateUserRequest { Name = "name", Age = 1 }); ``` ## Exception Handling diff --git a/seed/csharp-sdk/multi-line-docs/reference.md b/seed/csharp-sdk/multi-line-docs/reference.md index 9b71db0a629..9b623c91d5c 100644 --- a/seed/csharp-sdk/multi-line-docs/reference.md +++ b/seed/csharp-sdk/multi-line-docs/reference.md @@ -86,7 +86,7 @@ This endpoint is used to create a new user.
```csharp -await client.User.CreateUserAsync(new CreateUserRequest { Name = "name", Age = null }); +await client.User.CreateUserAsync(new CreateUserRequest { Name = "name", Age = 1 }); ```
diff --git a/seed/csharp-sdk/multi-line-docs/snippet.json b/seed/csharp-sdk/multi-line-docs/snippet.json index 705c93dbccf..ef4bf9b4c2d 100644 --- a/seed/csharp-sdk/multi-line-docs/snippet.json +++ b/seed/csharp-sdk/multi-line-docs/snippet.json @@ -22,7 +22,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedMultiLineDocs;\n\nvar client = new SeedMultiLineDocsClient();\nawait client.User.CreateUserAsync(new CreateUserRequest { Name = \"name\", Age = null });\n" + "client": "using SeedMultiLineDocs;\n\nvar client = new SeedMultiLineDocsClient();\nawait client.User.CreateUserAsync(new CreateUserRequest { Name = \"name\", Age = 1 });\n" } } ] diff --git a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Unit/MockServer/CreateUserTest.cs b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Unit/MockServer/CreateUserTest.cs index ba66162ffe7..8d6567f2618 100644 --- a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Unit/MockServer/CreateUserTest.cs +++ b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Unit/MockServer/CreateUserTest.cs @@ -17,7 +17,8 @@ public async Task MockServerTest() { const string requestJson = """ { - "name": "name" + "name": "name", + "age": 1 } """; @@ -45,7 +46,7 @@ public async Task MockServerTest() ); var response = await Client.User.CreateUserAsync( - new CreateUserRequest { Name = "name", Age = null }, + new CreateUserRequest { Name = "name", Age = 1 }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs/User/UserClient.cs b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs/User/UserClient.cs index f32ad427df1..e344de9c75a 100644 --- a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs/User/UserClient.cs +++ b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs/User/UserClient.cs @@ -60,7 +60,7 @@ public async Task GetUserAsync( /// /// /// - /// await client.User.CreateUserAsync(new CreateUserRequest { Name = "name", Age = null }); + /// await client.User.CreateUserAsync(new CreateUserRequest { Name = "name", Age = 1 }); /// /// public async Task CreateUserAsync( diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/README.md b/seed/csharp-sdk/oauth-client-credentials-environment-variables/README.md index 15bad4b9118..cdc7ffb76af 100644 --- a/seed/csharp-sdk/oauth-client-credentials-environment-variables/README.md +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/README.md @@ -26,7 +26,7 @@ await client.Auth.GetTokenWithClientCredentialsAsync( ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", } ); ``` diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/reference.md b/seed/csharp-sdk/oauth-client-credentials-environment-variables/reference.md index 009ce7bba9d..0cf9ccf49a4 100644 --- a/seed/csharp-sdk/oauth-client-credentials-environment-variables/reference.md +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/reference.md @@ -20,7 +20,7 @@ await client.Auth.GetTokenWithClientCredentialsAsync( ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", } ); ``` @@ -70,7 +70,7 @@ await client.Auth.RefreshTokenAsync( RefreshToken = "refresh_token", Audience = "https://api.example.com", GrantType = "refresh_token", - Scope = null, + Scope = "scope", } ); ``` diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/snippet.json b/seed/csharp-sdk/oauth-client-credentials-environment-variables/snippet.json index 4d929500e39..d3b20375a07 100644 --- a/seed/csharp-sdk/oauth-client-credentials-environment-variables/snippet.json +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/snippet.json @@ -10,7 +10,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedOauthClientCredentialsEnvironmentVariables;\n\nvar client = new SeedOauthClientCredentialsEnvironmentVariablesClient(\"CLIENT_ID\", \"CLIENT_SECRET\");\nawait client.Auth.GetTokenWithClientCredentialsAsync(\n new GetTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n Audience = \"https://api.example.com\",\n GrantType = \"client_credentials\",\n Scope = null,\n }\n);\n" + "client": "using SeedOauthClientCredentialsEnvironmentVariables;\n\nvar client = new SeedOauthClientCredentialsEnvironmentVariablesClient(\"CLIENT_ID\", \"CLIENT_SECRET\");\nawait client.Auth.GetTokenWithClientCredentialsAsync(\n new GetTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n Audience = \"https://api.example.com\",\n GrantType = \"client_credentials\",\n Scope = \"scope\",\n }\n);\n" } }, { @@ -22,7 +22,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedOauthClientCredentialsEnvironmentVariables;\n\nvar client = new SeedOauthClientCredentialsEnvironmentVariablesClient(\"CLIENT_ID\", \"CLIENT_SECRET\");\nawait client.Auth.RefreshTokenAsync(\n new RefreshTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n RefreshToken = \"refresh_token\",\n Audience = \"https://api.example.com\",\n GrantType = \"refresh_token\",\n Scope = null,\n }\n);\n" + "client": "using SeedOauthClientCredentialsEnvironmentVariables;\n\nvar client = new SeedOauthClientCredentialsEnvironmentVariablesClient(\"CLIENT_ID\", \"CLIENT_SECRET\");\nawait client.Auth.RefreshTokenAsync(\n new RefreshTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n RefreshToken = \"refresh_token\",\n Audience = \"https://api.example.com\",\n GrantType = \"refresh_token\",\n Scope = \"scope\",\n }\n);\n" } } ] diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/GetTokenWithClientCredentialsTest.cs b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/GetTokenWithClientCredentialsTest.cs index 4da48db5612..3c6eb48952c 100644 --- a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/GetTokenWithClientCredentialsTest.cs +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/GetTokenWithClientCredentialsTest.cs @@ -20,7 +20,8 @@ public async Task MockServerTest() "client_id": "client_id", "client_secret": "client_secret", "audience": "https://api.example.com", - "grant_type": "client_credentials" + "grant_type": "client_credentials", + "scope": "scope" } """; @@ -54,7 +55,7 @@ public async Task MockServerTest() ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", }, RequestOptions ); diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/RefreshTokenTest.cs b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/RefreshTokenTest.cs index be6651cf2a1..8e61f60eba1 100644 --- a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/RefreshTokenTest.cs +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/RefreshTokenTest.cs @@ -21,7 +21,8 @@ public async Task MockServerTest() "client_secret": "client_secret", "refresh_token": "refresh_token", "audience": "https://api.example.com", - "grant_type": "refresh_token" + "grant_type": "refresh_token", + "scope": "scope" } """; @@ -56,7 +57,7 @@ public async Task MockServerTest() RefreshToken = "refresh_token", Audience = "https://api.example.com", GrantType = "refresh_token", - Scope = null, + Scope = "scope", }, RequestOptions ); diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/Auth/AuthClient.cs b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/Auth/AuthClient.cs index ace972c9be2..460862f8af8 100644 --- a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/Auth/AuthClient.cs +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/Auth/AuthClient.cs @@ -25,7 +25,7 @@ internal AuthClient(RawClient client) /// ClientSecret = "client_secret", /// Audience = "https://api.example.com", /// GrantType = "client_credentials", - /// Scope = null, + /// Scope = "scope", /// } /// ); ///
@@ -80,7 +80,7 @@ public async Task GetTokenWithClientCredentialsAsync( /// RefreshToken = "refresh_token", /// Audience = "https://api.example.com", /// GrantType = "refresh_token", - /// Scope = null, + /// Scope = "scope", /// } /// ); /// diff --git a/seed/csharp-sdk/oauth-client-credentials-nested-root/README.md b/seed/csharp-sdk/oauth-client-credentials-nested-root/README.md index 98d32f9b8f4..fa1033470cf 100644 --- a/seed/csharp-sdk/oauth-client-credentials-nested-root/README.md +++ b/seed/csharp-sdk/oauth-client-credentials-nested-root/README.md @@ -27,7 +27,7 @@ await client.Auth.GetTokenAsync( ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", } ); ``` diff --git a/seed/csharp-sdk/oauth-client-credentials-nested-root/reference.md b/seed/csharp-sdk/oauth-client-credentials-nested-root/reference.md index d499c702d9c..0b5a4d941f1 100644 --- a/seed/csharp-sdk/oauth-client-credentials-nested-root/reference.md +++ b/seed/csharp-sdk/oauth-client-credentials-nested-root/reference.md @@ -20,7 +20,7 @@ await client.Auth.GetTokenAsync( ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", } ); ``` diff --git a/seed/csharp-sdk/oauth-client-credentials-nested-root/snippet.json b/seed/csharp-sdk/oauth-client-credentials-nested-root/snippet.json index e5045585b2b..e39f7dbdfd7 100644 --- a/seed/csharp-sdk/oauth-client-credentials-nested-root/snippet.json +++ b/seed/csharp-sdk/oauth-client-credentials-nested-root/snippet.json @@ -10,7 +10,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedOauthClientCredentials.Auth;\nusing SeedOauthClientCredentials;\n\nvar client = new SeedOauthClientCredentialsClient(\"CLIENT_ID\", \"CLIENT_SECRET\");\nawait client.Auth.GetTokenAsync(\n new GetTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n Audience = \"https://api.example.com\",\n GrantType = \"client_credentials\",\n Scope = null,\n }\n);\n" + "client": "using SeedOauthClientCredentials.Auth;\nusing SeedOauthClientCredentials;\n\nvar client = new SeedOauthClientCredentialsClient(\"CLIENT_ID\", \"CLIENT_SECRET\");\nawait client.Auth.GetTokenAsync(\n new GetTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n Audience = \"https://api.example.com\",\n GrantType = \"client_credentials\",\n Scope = \"scope\",\n }\n);\n" } } ] diff --git a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Unit/MockServer/GetTokenTest.cs b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Unit/MockServer/GetTokenTest.cs index 8f30e7471bb..1c6f068090c 100644 --- a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Unit/MockServer/GetTokenTest.cs +++ b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Unit/MockServer/GetTokenTest.cs @@ -20,7 +20,8 @@ public async Task MockServerTest() "client_id": "client_id", "client_secret": "client_secret", "audience": "https://api.example.com", - "grant_type": "client_credentials" + "grant_type": "client_credentials", + "scope": "scope" } """; @@ -54,7 +55,7 @@ public async Task MockServerTest() ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", }, RequestOptions ); diff --git a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/Auth/AuthClient.cs b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/Auth/AuthClient.cs index d915ece7a45..244e8c07351 100644 --- a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/Auth/AuthClient.cs +++ b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/Auth/AuthClient.cs @@ -26,7 +26,7 @@ internal AuthClient(RawClient client) /// ClientSecret = "client_secret", /// Audience = "https://api.example.com", /// GrantType = "client_credentials", - /// Scope = null, + /// Scope = "scope", /// } /// ); /// diff --git a/seed/csharp-sdk/oauth-client-credentials/README.md b/seed/csharp-sdk/oauth-client-credentials/README.md index 059219529ad..33128686ea2 100644 --- a/seed/csharp-sdk/oauth-client-credentials/README.md +++ b/seed/csharp-sdk/oauth-client-credentials/README.md @@ -26,7 +26,7 @@ await client.Auth.GetTokenWithClientCredentialsAsync( ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", } ); ``` diff --git a/seed/csharp-sdk/oauth-client-credentials/reference.md b/seed/csharp-sdk/oauth-client-credentials/reference.md index a1513ed0f8e..068cd95a61b 100644 --- a/seed/csharp-sdk/oauth-client-credentials/reference.md +++ b/seed/csharp-sdk/oauth-client-credentials/reference.md @@ -20,7 +20,7 @@ await client.Auth.GetTokenWithClientCredentialsAsync( ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", } ); ``` @@ -70,7 +70,7 @@ await client.Auth.RefreshTokenAsync( RefreshToken = "refresh_token", Audience = "https://api.example.com", GrantType = "refresh_token", - Scope = null, + Scope = "scope", } ); ``` diff --git a/seed/csharp-sdk/oauth-client-credentials/snippet.json b/seed/csharp-sdk/oauth-client-credentials/snippet.json index a33171e2e04..4b8f52cce00 100644 --- a/seed/csharp-sdk/oauth-client-credentials/snippet.json +++ b/seed/csharp-sdk/oauth-client-credentials/snippet.json @@ -10,7 +10,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedOauthClientCredentials;\n\nvar client = new SeedOauthClientCredentialsClient(\"CLIENT_ID\", \"CLIENT_SECRET\");\nawait client.Auth.GetTokenWithClientCredentialsAsync(\n new GetTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n Audience = \"https://api.example.com\",\n GrantType = \"client_credentials\",\n Scope = null,\n }\n);\n" + "client": "using SeedOauthClientCredentials;\n\nvar client = new SeedOauthClientCredentialsClient(\"CLIENT_ID\", \"CLIENT_SECRET\");\nawait client.Auth.GetTokenWithClientCredentialsAsync(\n new GetTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n Audience = \"https://api.example.com\",\n GrantType = \"client_credentials\",\n Scope = \"scope\",\n }\n);\n" } }, { @@ -22,7 +22,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedOauthClientCredentials;\n\nvar client = new SeedOauthClientCredentialsClient(\"CLIENT_ID\", \"CLIENT_SECRET\");\nawait client.Auth.RefreshTokenAsync(\n new RefreshTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n RefreshToken = \"refresh_token\",\n Audience = \"https://api.example.com\",\n GrantType = \"refresh_token\",\n Scope = null,\n }\n);\n" + "client": "using SeedOauthClientCredentials;\n\nvar client = new SeedOauthClientCredentialsClient(\"CLIENT_ID\", \"CLIENT_SECRET\");\nawait client.Auth.RefreshTokenAsync(\n new RefreshTokenRequest\n {\n ClientId = \"client_id\",\n ClientSecret = \"client_secret\",\n RefreshToken = \"refresh_token\",\n Audience = \"https://api.example.com\",\n GrantType = \"refresh_token\",\n Scope = \"scope\",\n }\n);\n" } } ] diff --git a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/GetTokenWithClientCredentialsTest.cs b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/GetTokenWithClientCredentialsTest.cs index 09341d35542..1bb38f32c64 100644 --- a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/GetTokenWithClientCredentialsTest.cs +++ b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/GetTokenWithClientCredentialsTest.cs @@ -20,7 +20,8 @@ public async Task MockServerTest() "client_id": "client_id", "client_secret": "client_secret", "audience": "https://api.example.com", - "grant_type": "client_credentials" + "grant_type": "client_credentials", + "scope": "scope" } """; @@ -54,7 +55,7 @@ public async Task MockServerTest() ClientSecret = "client_secret", Audience = "https://api.example.com", GrantType = "client_credentials", - Scope = null, + Scope = "scope", }, RequestOptions ); diff --git a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/RefreshTokenTest.cs b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/RefreshTokenTest.cs index bce9af83ac8..c055ec03c78 100644 --- a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/RefreshTokenTest.cs +++ b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/RefreshTokenTest.cs @@ -21,7 +21,8 @@ public async Task MockServerTest() "client_secret": "client_secret", "refresh_token": "refresh_token", "audience": "https://api.example.com", - "grant_type": "refresh_token" + "grant_type": "refresh_token", + "scope": "scope" } """; @@ -56,7 +57,7 @@ public async Task MockServerTest() RefreshToken = "refresh_token", Audience = "https://api.example.com", GrantType = "refresh_token", - Scope = null, + Scope = "scope", }, RequestOptions ); diff --git a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials/Auth/AuthClient.cs b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials/Auth/AuthClient.cs index 8fd5af38fc9..6d7ea5e26a2 100644 --- a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials/Auth/AuthClient.cs +++ b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials/Auth/AuthClient.cs @@ -25,7 +25,7 @@ internal AuthClient(RawClient client) /// ClientSecret = "client_secret", /// Audience = "https://api.example.com", /// GrantType = "client_credentials", - /// Scope = null, + /// Scope = "scope", /// } /// ); /// @@ -77,7 +77,7 @@ public async Task GetTokenWithClientCredentialsAsync( /// RefreshToken = "refresh_token", /// Audience = "https://api.example.com", /// GrantType = "refresh_token", - /// Scope = null, + /// Scope = "scope", /// } /// ); /// diff --git a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/README.md b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/README.md index 0ae498cf969..42082bb87f7 100644 --- a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/README.md +++ b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/README.md @@ -19,7 +19,15 @@ Instantiate and use the client with the following: using SeedObjectsWithImports; var client = new SeedObjectsWithImportsClient(); -await client.Optional.SendOptionalBodyAsync(null); +await client.Optional.SendOptionalBodyAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } +); ``` ## Exception Handling diff --git a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/reference.md b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/reference.md index 85cca5de8c2..33b44a0e342 100644 --- a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/reference.md +++ b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/reference.md @@ -13,7 +13,15 @@
```csharp -await client.Optional.SendOptionalBodyAsync(null); +await client.Optional.SendOptionalBodyAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } +); ```
diff --git a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/snippet.json b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/snippet.json index 0546f62073f..4aa103e15da 100644 --- a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/snippet.json +++ b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/snippet.json @@ -10,7 +10,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedObjectsWithImports;\n\nvar client = new SeedObjectsWithImportsClient();\nawait client.Optional.SendOptionalBodyAsync(null);\n" + "client": "using SeedObjectsWithImports;\n\nvar client = new SeedObjectsWithImportsClient();\nawait client.Optional.SendOptionalBodyAsync(\n new Dictionary()\n {\n {\n \"string\",\n new Dictionary() { { \"key\", \"value\" } }\n },\n }\n);\n" } } ] diff --git a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Unit/MockServer/SendOptionalBodyTest.cs b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Unit/MockServer/SendOptionalBodyTest.cs index 2b933e5671c..30eaf83aa46 100644 --- a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Unit/MockServer/SendOptionalBodyTest.cs +++ b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Unit/MockServer/SendOptionalBodyTest.cs @@ -15,7 +15,11 @@ public class SendOptionalBodyTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - + { + "string": { + "key": "value" + } + } """; const string mockResponse = """ @@ -28,7 +32,7 @@ public async Task MockServerTest() .RequestBuilders.Request.Create() .WithPath("/send-optional-body") .UsingPost() - .WithBody(requestJson) + .WithBodyAsJson(requestJson) ) .RespondWith( WireMock @@ -37,7 +41,16 @@ public async Task MockServerTest() .WithBody(mockResponse) ); - var response = await Client.Optional.SendOptionalBodyAsync(null, RequestOptions); + var response = await Client.Optional.SendOptionalBodyAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + }, + RequestOptions + ); JToken .Parse(mockResponse) .Should() diff --git a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports/Optional/OptionalClient.cs b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports/Optional/OptionalClient.cs index f6cb148b5ea..6e6c625c8de 100644 --- a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports/Optional/OptionalClient.cs +++ b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports/Optional/OptionalClient.cs @@ -18,7 +18,15 @@ internal OptionalClient(RawClient client) /// /// - /// await client.Optional.SendOptionalBodyAsync(null); + /// await client.Optional.SendOptionalBodyAsync( + /// new Dictionary<string, object>() + /// { + /// { + /// "string", + /// new Dictionary<object, object?>() { { "key", "value" } } + /// }, + /// } + /// ); /// /// public async Task SendOptionalBodyAsync( diff --git a/seed/csharp-sdk/pagination/README.md b/seed/csharp-sdk/pagination/README.md index 0a1c2d228e6..51b5856f401 100644 --- a/seed/csharp-sdk/pagination/README.md +++ b/seed/csharp-sdk/pagination/README.md @@ -20,7 +20,7 @@ using SeedPagination; var client = new SeedPaginationClient("TOKEN"); await client.Users.ListWithBodyCursorPaginationAsync( - new ListUsersBodyCursorPaginationRequest { Pagination = null } + new ListUsersBodyCursorPaginationRequest { Pagination = new WithCursor { Cursor = "cursor" } } ); ``` diff --git a/seed/csharp-sdk/pagination/reference.md b/seed/csharp-sdk/pagination/reference.md index 1fd815ad0ef..a58df02639d 100644 --- a/seed/csharp-sdk/pagination/reference.md +++ b/seed/csharp-sdk/pagination/reference.md @@ -13,7 +13,15 @@
```csharp -await client.Users.ListWithCursorPaginationAsync(new ListUsersCursorPaginationRequest()); +await client.Users.ListWithCursorPaginationAsync( + new ListUsersCursorPaginationRequest + { + Page = 1, + PerPage = 1, + Order = Order.Asc, + StartingAfter = "starting_after", + } +); ```
@@ -54,7 +62,7 @@ await client.Users.ListWithCursorPaginationAsync(new ListUsersCursorPaginationRe ```csharp await client.Users.ListWithBodyCursorPaginationAsync( - new ListUsersBodyCursorPaginationRequest { Pagination = null } + new ListUsersBodyCursorPaginationRequest { Pagination = new WithCursor { Cursor = "cursor" } } ); ``` @@ -95,7 +103,15 @@ await client.Users.ListWithBodyCursorPaginationAsync(
```csharp -await client.Users.ListWithOffsetPaginationAsync(new ListUsersOffsetPaginationRequest()); +await client.Users.ListWithOffsetPaginationAsync( + new ListUsersOffsetPaginationRequest + { + Page = 1, + PerPage = 1, + Order = Order.Asc, + StartingAfter = "starting_after", + } +); ```
@@ -136,7 +152,7 @@ await client.Users.ListWithOffsetPaginationAsync(new ListUsersOffsetPaginationRe ```csharp await client.Users.ListWithBodyOffsetPaginationAsync( - new ListUsersBodyOffsetPaginationRequest { Pagination = null } + new ListUsersBodyOffsetPaginationRequest { Pagination = new WithPage { Page = 1 } } ); ``` @@ -177,7 +193,14 @@ await client.Users.ListWithBodyOffsetPaginationAsync(
```csharp -await client.Users.ListWithOffsetStepPaginationAsync(new ListUsersOffsetStepPaginationRequest()); +await client.Users.ListWithOffsetStepPaginationAsync( + new ListUsersOffsetStepPaginationRequest + { + Page = 1, + Limit = 1, + Order = Order.Asc, + } +); ```
@@ -218,7 +241,12 @@ await client.Users.ListWithOffsetStepPaginationAsync(new ListUsersOffsetStepPagi ```csharp await client.Users.ListWithOffsetPaginationHasNextPageAsync( - new ListWithOffsetPaginationHasNextPageRequest() + new ListWithOffsetPaginationHasNextPageRequest + { + Page = 1, + Limit = 1, + Order = Order.Asc, + } ); ``` @@ -259,7 +287,9 @@ await client.Users.ListWithOffsetPaginationHasNextPageAsync(
```csharp -await client.Users.ListWithExtendedResultsAsync(new ListUsersExtendedRequest()); +await client.Users.ListWithExtendedResultsAsync( + new ListUsersExtendedRequest { Cursor = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" } +); ```
@@ -300,7 +330,7 @@ await client.Users.ListWithExtendedResultsAsync(new ListUsersExtendedRequest()); ```csharp await client.Users.ListWithExtendedResultsAndOptionalDataAsync( - new ListUsersExtendedRequestForOptionalData() + new ListUsersExtendedRequestForOptionalData { Cursor = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" } ); ``` @@ -341,7 +371,9 @@ await client.Users.ListWithExtendedResultsAndOptionalDataAsync(
```csharp -await client.Users.ListUsernamesAsync(new ListUsernamesRequest()); +await client.Users.ListUsernamesAsync( + new ListUsernamesRequest { StartingAfter = "starting_after" } +); ```
@@ -381,7 +413,7 @@ await client.Users.ListUsernamesAsync(new ListUsernamesRequest());
```csharp -await client.Users.ListWithGlobalConfigAsync(new ListWithGlobalConfigRequest()); +await client.Users.ListWithGlobalConfigAsync(new ListWithGlobalConfigRequest { Offset = 1 }); ```
diff --git a/seed/csharp-sdk/pagination/snippet.json b/seed/csharp-sdk/pagination/snippet.json index 8968a1ac7e7..9a02cb682ec 100644 --- a/seed/csharp-sdk/pagination/snippet.json +++ b/seed/csharp-sdk/pagination/snippet.json @@ -10,7 +10,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithCursorPaginationAsync(new ListUsersCursorPaginationRequest());\n" + "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithCursorPaginationAsync(\n new ListUsersCursorPaginationRequest\n {\n Page = 1,\n PerPage = 1,\n Order = Order.Asc,\n StartingAfter = \"starting_after\",\n }\n);\n" } }, { @@ -22,7 +22,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithBodyCursorPaginationAsync(\n new ListUsersBodyCursorPaginationRequest { Pagination = null }\n);\n" + "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithBodyCursorPaginationAsync(\n new ListUsersBodyCursorPaginationRequest { Pagination = new WithCursor { Cursor = \"cursor\" } }\n);\n" } }, { @@ -34,7 +34,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithOffsetPaginationAsync(new ListUsersOffsetPaginationRequest());\n" + "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithOffsetPaginationAsync(\n new ListUsersOffsetPaginationRequest\n {\n Page = 1,\n PerPage = 1,\n Order = Order.Asc,\n StartingAfter = \"starting_after\",\n }\n);\n" } }, { @@ -46,7 +46,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithBodyOffsetPaginationAsync(\n new ListUsersBodyOffsetPaginationRequest { Pagination = null }\n);\n" + "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithBodyOffsetPaginationAsync(\n new ListUsersBodyOffsetPaginationRequest { Pagination = new WithPage { Page = 1 } }\n);\n" } }, { @@ -58,7 +58,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithOffsetStepPaginationAsync(new ListUsersOffsetStepPaginationRequest());\n" + "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithOffsetStepPaginationAsync(\n new ListUsersOffsetStepPaginationRequest\n {\n Page = 1,\n Limit = 1,\n Order = Order.Asc,\n }\n);\n" } }, { @@ -70,7 +70,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithOffsetPaginationHasNextPageAsync(\n new ListWithOffsetPaginationHasNextPageRequest()\n);\n" + "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithOffsetPaginationHasNextPageAsync(\n new ListWithOffsetPaginationHasNextPageRequest\n {\n Page = 1,\n Limit = 1,\n Order = Order.Asc,\n }\n);\n" } }, { @@ -82,7 +82,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithExtendedResultsAsync(new ListUsersExtendedRequest());\n" + "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithExtendedResultsAsync(\n new ListUsersExtendedRequest { Cursor = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\" }\n);\n" } }, { @@ -94,7 +94,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithExtendedResultsAndOptionalDataAsync(\n new ListUsersExtendedRequestForOptionalData()\n);\n" + "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithExtendedResultsAndOptionalDataAsync(\n new ListUsersExtendedRequestForOptionalData { Cursor = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\" }\n);\n" } }, { @@ -106,7 +106,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListUsernamesAsync(new ListUsernamesRequest());\n" + "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListUsernamesAsync(\n new ListUsernamesRequest { StartingAfter = \"starting_after\" }\n);\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithGlobalConfigAsync(new ListWithGlobalConfigRequest());\n" + "client": "using SeedPagination;\n\nvar client = new SeedPaginationClient(\"TOKEN\");\nawait client.Users.ListWithGlobalConfigAsync(new ListWithGlobalConfigRequest { Offset = 1 });\n" } } ] diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListUsernamesTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListUsernamesTest.cs index fb0eb168fa8..ae3186eece7 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListUsernamesTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListUsernamesTest.cs @@ -28,7 +28,13 @@ public async Task MockServerTest() """; Server - .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users").UsingGet()) + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .WithParam("starting_after", "starting_after") + .UsingGet() + ) .RespondWith( WireMock .ResponseBuilders.Response.Create() @@ -37,7 +43,7 @@ public async Task MockServerTest() ); var response = await Client.Users.ListUsernamesAsync( - new ListUsernamesRequest(), + new ListUsernamesRequest { StartingAfter = "starting_after" }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithBodyCursorPaginationTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithBodyCursorPaginationTest.cs index 82429bf56fd..7ec736377ba 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithBodyCursorPaginationTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithBodyCursorPaginationTest.cs @@ -16,7 +16,11 @@ public class ListWithBodyCursorPaginationTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "pagination": { + "cursor": "cursor" + } + } """; const string mockResponse = """ @@ -61,7 +65,10 @@ public async Task MockServerTest() ); var response = await Client.Users.ListWithBodyCursorPaginationAsync( - new ListUsersBodyCursorPaginationRequest { Pagination = null }, + new ListUsersBodyCursorPaginationRequest + { + Pagination = new WithCursor { Cursor = "cursor" }, + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithBodyOffsetPaginationTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithBodyOffsetPaginationTest.cs index 6500ad89df7..d8e44127b48 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithBodyOffsetPaginationTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithBodyOffsetPaginationTest.cs @@ -16,7 +16,11 @@ public class ListWithBodyOffsetPaginationTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - {} + { + "pagination": { + "page": 1 + } + } """; const string mockResponse = """ @@ -61,7 +65,7 @@ public async Task MockServerTest() ); var response = await Client.Users.ListWithBodyOffsetPaginationAsync( - new ListUsersBodyOffsetPaginationRequest { Pagination = null }, + new ListUsersBodyOffsetPaginationRequest { Pagination = new WithPage { Page = 1 } }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithCursorPaginationTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithCursorPaginationTest.cs index e5e951d61fa..9d97ada8589 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithCursorPaginationTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithCursorPaginationTest.cs @@ -42,7 +42,16 @@ public async Task MockServerTest() """; Server - .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users").UsingGet()) + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .WithParam("page", "1") + .WithParam("per_page", "1") + .WithParam("order", "asc") + .WithParam("starting_after", "starting_after") + .UsingGet() + ) .RespondWith( WireMock .ResponseBuilders.Response.Create() @@ -51,7 +60,13 @@ public async Task MockServerTest() ); var response = await Client.Users.ListWithCursorPaginationAsync( - new ListUsersCursorPaginationRequest(), + new ListUsersCursorPaginationRequest + { + Page = 1, + PerPage = 1, + Order = Order.Asc, + StartingAfter = "starting_after", + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithExtendedResultsAndOptionalDataTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithExtendedResultsAndOptionalDataTest.cs index c23b376032c..74d0f4138cb 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithExtendedResultsAndOptionalDataTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithExtendedResultsAndOptionalDataTest.cs @@ -22,7 +22,13 @@ public async Task MockServerTest() """; Server - .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users").UsingGet()) + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .WithParam("cursor", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") + .UsingGet() + ) .RespondWith( WireMock .ResponseBuilders.Response.Create() @@ -31,7 +37,10 @@ public async Task MockServerTest() ); var response = await Client.Users.ListWithExtendedResultsAndOptionalDataAsync( - new ListUsersExtendedRequestForOptionalData(), + new ListUsersExtendedRequestForOptionalData + { + Cursor = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithExtendedResultsTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithExtendedResultsTest.cs index 7f21119310d..aaf400738a0 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithExtendedResultsTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithExtendedResultsTest.cs @@ -22,7 +22,13 @@ public async Task MockServerTest() """; Server - .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users").UsingGet()) + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .WithParam("cursor", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") + .UsingGet() + ) .RespondWith( WireMock .ResponseBuilders.Response.Create() @@ -31,7 +37,7 @@ public async Task MockServerTest() ); var response = await Client.Users.ListWithExtendedResultsAsync( - new ListUsersExtendedRequest(), + new ListUsersExtendedRequest { Cursor = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithGlobalConfigTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithGlobalConfigTest.cs index 1929f7a4093..5a98621c0fa 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithGlobalConfigTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithGlobalConfigTest.cs @@ -25,7 +25,13 @@ public async Task MockServerTest() """; Server - .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users").UsingGet()) + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .WithParam("offset", "1") + .UsingGet() + ) .RespondWith( WireMock .ResponseBuilders.Response.Create() @@ -34,7 +40,7 @@ public async Task MockServerTest() ); var response = await Client.Users.ListWithGlobalConfigAsync( - new ListWithGlobalConfigRequest(), + new ListWithGlobalConfigRequest { Offset = 1 }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetPaginationHasNextPageTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetPaginationHasNextPageTest.cs index bdc085b1aa4..d70397dbbdd 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetPaginationHasNextPageTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetPaginationHasNextPageTest.cs @@ -42,7 +42,15 @@ public async Task MockServerTest() """; Server - .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users").UsingGet()) + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .WithParam("page", "1") + .WithParam("limit", "1") + .WithParam("order", "asc") + .UsingGet() + ) .RespondWith( WireMock .ResponseBuilders.Response.Create() @@ -51,7 +59,12 @@ public async Task MockServerTest() ); var response = await Client.Users.ListWithOffsetPaginationHasNextPageAsync( - new ListWithOffsetPaginationHasNextPageRequest(), + new ListWithOffsetPaginationHasNextPageRequest + { + Page = 1, + Limit = 1, + Order = Order.Asc, + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetPaginationTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetPaginationTest.cs index b0d169fe28e..ae9cf557bdc 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetPaginationTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetPaginationTest.cs @@ -42,7 +42,16 @@ public async Task MockServerTest() """; Server - .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users").UsingGet()) + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .WithParam("page", "1") + .WithParam("per_page", "1") + .WithParam("order", "asc") + .WithParam("starting_after", "starting_after") + .UsingGet() + ) .RespondWith( WireMock .ResponseBuilders.Response.Create() @@ -51,7 +60,13 @@ public async Task MockServerTest() ); var response = await Client.Users.ListWithOffsetPaginationAsync( - new ListUsersOffsetPaginationRequest(), + new ListUsersOffsetPaginationRequest + { + Page = 1, + PerPage = 1, + Order = Order.Asc, + StartingAfter = "starting_after", + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetStepPaginationTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetStepPaginationTest.cs index d3f97991b4a..374471bcc9a 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetStepPaginationTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/ListWithOffsetStepPaginationTest.cs @@ -42,7 +42,15 @@ public async Task MockServerTest() """; Server - .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users").UsingGet()) + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .WithParam("page", "1") + .WithParam("limit", "1") + .WithParam("order", "asc") + .UsingGet() + ) .RespondWith( WireMock .ResponseBuilders.Response.Create() @@ -51,7 +59,12 @@ public async Task MockServerTest() ); var response = await Client.Users.ListWithOffsetStepPaginationAsync( - new ListUsersOffsetStepPaginationRequest(), + new ListUsersOffsetStepPaginationRequest + { + Page = 1, + Limit = 1, + Order = Order.Asc, + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/pagination/src/SeedPagination/Users/UsersClient.cs b/seed/csharp-sdk/pagination/src/SeedPagination/Users/UsersClient.cs index 6947264f465..314aefdc2ff 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination/Users/UsersClient.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination/Users/UsersClient.cs @@ -18,7 +18,15 @@ internal UsersClient(RawClient client) /// /// - /// await client.Users.ListWithCursorPaginationAsync(new ListUsersCursorPaginationRequest()); + /// await client.Users.ListWithCursorPaginationAsync( + /// new ListUsersCursorPaginationRequest + /// { + /// Page = 1, + /// PerPage = 1, + /// Order = Order.Asc, + /// StartingAfter = "starting_after", + /// } + /// ); /// /// public async Task ListWithCursorPaginationAsync( @@ -78,7 +86,7 @@ public async Task ListWithCursorPaginationAsync( /// /// /// await client.Users.ListWithBodyCursorPaginationAsync( - /// new ListUsersBodyCursorPaginationRequest { Pagination = null } + /// new ListUsersBodyCursorPaginationRequest { Pagination = new WithCursor { Cursor = "cursor" } } /// ); /// /// @@ -121,7 +129,15 @@ public async Task ListWithBodyCursorPaginationAsync /// /// - /// await client.Users.ListWithOffsetPaginationAsync(new ListUsersOffsetPaginationRequest()); + /// await client.Users.ListWithOffsetPaginationAsync( + /// new ListUsersOffsetPaginationRequest + /// { + /// Page = 1, + /// PerPage = 1, + /// Order = Order.Asc, + /// StartingAfter = "starting_after", + /// } + /// ); /// /// public async Task ListWithOffsetPaginationAsync( @@ -181,7 +197,7 @@ public async Task ListWithOffsetPaginationAsync( /// /// /// await client.Users.ListWithBodyOffsetPaginationAsync( - /// new ListUsersBodyOffsetPaginationRequest { Pagination = null } + /// new ListUsersBodyOffsetPaginationRequest { Pagination = new WithPage { Page = 1 } } /// ); /// /// @@ -224,7 +240,14 @@ public async Task ListWithBodyOffsetPaginationAsync /// /// - /// await client.Users.ListWithOffsetStepPaginationAsync(new ListUsersOffsetStepPaginationRequest()); + /// await client.Users.ListWithOffsetStepPaginationAsync( + /// new ListUsersOffsetStepPaginationRequest + /// { + /// Page = 1, + /// Limit = 1, + /// Order = Order.Asc, + /// } + /// ); /// /// public async Task ListWithOffsetStepPaginationAsync( @@ -280,7 +303,12 @@ public async Task ListWithOffsetStepPaginationAsync /// /// /// await client.Users.ListWithOffsetPaginationHasNextPageAsync( - /// new ListWithOffsetPaginationHasNextPageRequest() + /// new ListWithOffsetPaginationHasNextPageRequest + /// { + /// Page = 1, + /// Limit = 1, + /// Order = Order.Asc, + /// } /// ); /// /// @@ -336,7 +364,9 @@ public async Task ListWithOffsetPaginationHasNextPa /// /// - /// await client.Users.ListWithExtendedResultsAsync(new ListUsersExtendedRequest()); + /// await client.Users.ListWithExtendedResultsAsync( + /// new ListUsersExtendedRequest { Cursor = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" } + /// ); /// /// public async Task ListWithExtendedResultsAsync( @@ -384,7 +414,7 @@ public async Task ListWithExtendedResultsAsync( /// /// /// await client.Users.ListWithExtendedResultsAndOptionalDataAsync( - /// new ListUsersExtendedRequestForOptionalData() + /// new ListUsersExtendedRequestForOptionalData { Cursor = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" } /// ); /// /// @@ -432,7 +462,9 @@ public async Task ListWithExtendedResults /// /// - /// await client.Users.ListUsernamesAsync(new ListUsernamesRequest()); + /// await client.Users.ListUsernamesAsync( + /// new ListUsernamesRequest { StartingAfter = "starting_after" } + /// ); /// /// public async Task ListUsernamesAsync( @@ -479,7 +511,7 @@ public async Task ListUsernamesAsync( /// /// - /// await client.Users.ListWithGlobalConfigAsync(new ListWithGlobalConfigRequest()); + /// await client.Users.ListWithGlobalConfigAsync(new ListWithGlobalConfigRequest { Offset = 1 }); /// /// public async Task ListWithGlobalConfigAsync( diff --git a/seed/csharp-sdk/trace/reference.md b/seed/csharp-sdk/trace/reference.md index 5b75bf31efe..79e4035e32e 100644 --- a/seed/csharp-sdk/trace/reference.md +++ b/seed/csharp-sdk/trace/reference.md @@ -272,19 +272,57 @@ await client.Admin.StoreTracedTestCaseAsync( { SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, - ReturnValue = null, - ExpressionLocation = null, - Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - Stdout = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + Stack = new StackInformation + { + NumStackFrames = 1, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + }, + }, + }, + Stdout = "stdout", }, new TraceResponse { SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, - ReturnValue = null, - ExpressionLocation = null, - Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - Stdout = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + Stack = new StackInformation + { + NumStackFrames = 1, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + }, + }, + }, + Stdout = "stdout", }, }, } @@ -354,20 +392,58 @@ await client.Admin.StoreTracedTestCaseV2Async( SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, File = new TracedFile { Filename = "filename", Directory = "directory" }, - ReturnValue = null, - ExpressionLocation = null, - Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - Stdout = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + Stack = new StackInformation + { + NumStackFrames = 1, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + }, + }, + }, + Stdout = "stdout", }, new TraceResponseV2 { SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, File = new TracedFile { Filename = "filename", Directory = "directory" }, - ReturnValue = null, - ExpressionLocation = null, - Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - Stdout = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + Stack = new StackInformation + { + NumStackFrames = 1, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + }, + }, + }, + Stdout = "stdout", }, } ); @@ -432,8 +508,18 @@ await client.Admin.StoreTracedWorkspaceAsync( { WorkspaceRunDetails = new WorkspaceRunDetails { - ExceptionV2 = null, - Exception = null, + ExceptionV2 = new ExceptionInfo + { + ExceptionType = "exceptionType", + ExceptionMessage = "exceptionMessage", + ExceptionStacktrace = "exceptionStacktrace", + }, + Exception = new ExceptionInfo + { + ExceptionType = "exceptionType", + ExceptionMessage = "exceptionMessage", + ExceptionStacktrace = "exceptionStacktrace", + }, Stdout = "stdout", }, TraceResponses = new List() @@ -442,19 +528,57 @@ await client.Admin.StoreTracedWorkspaceAsync( { SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, - ReturnValue = null, - ExpressionLocation = null, - Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - Stdout = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + Stack = new StackInformation + { + NumStackFrames = 1, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + }, + }, + }, + Stdout = "stdout", }, new TraceResponse { SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, - ReturnValue = null, - ExpressionLocation = null, - Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - Stdout = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + Stack = new StackInformation + { + NumStackFrames = 1, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + }, + }, + }, + Stdout = "stdout", }, }, } @@ -515,20 +639,58 @@ await client.Admin.StoreTracedWorkspaceV2Async( SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, File = new TracedFile { Filename = "filename", Directory = "directory" }, - ReturnValue = null, - ExpressionLocation = null, - Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - Stdout = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + Stack = new StackInformation + { + NumStackFrames = 1, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + }, + }, + }, + Stdout = "stdout", }, new TraceResponseV2 { SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, File = new TracedFile { Filename = "filename", Directory = "directory" }, - ReturnValue = null, - ExpressionLocation = null, - Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - Stdout = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + Stack = new StackInformation + { + NumStackFrames = 1, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + new Scope + { + Variables = new Dictionary() { { "variables", 1 } }, + }, + }, + }, + }, + Stdout = "stdout", }, } ); @@ -708,6 +870,7 @@ await client.Playlist.CreatePlaylistAsync( new CreatePlaylistRequest { Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + OptionalDatetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), Body = new PlaylistCreateRequest { Name = "name", @@ -780,8 +943,10 @@ await client.Playlist.GetPlaylistsAsync( 1, new GetPlaylistsRequest { + Limit = 1, OtherField = "otherField", MultiLineDocs = "multiLineDocs", + OptionalMultipleField = ["optionalMultipleField"], MultipleField = ["multipleField"], } ); @@ -908,7 +1073,15 @@ Updates a playlist
```csharp -await client.Playlist.UpdatePlaylistAsync(1, "playlistId", null); +await client.Playlist.UpdatePlaylistAsync( + 1, + "playlistId", + new UpdatePlaylistRequest + { + Name = "name", + Problems = new List() { "problems", "problems" }, + } +); ```
diff --git a/seed/csharp-sdk/trace/snippet.json b/seed/csharp-sdk/trace/snippet.json index d6645cf2a6b..15b6724cbfd 100644 --- a/seed/csharp-sdk/trace/snippet.json +++ b/seed/csharp-sdk/trace/snippet.json @@ -70,7 +70,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Admin.StoreTracedTestCaseAsync(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"testCaseId\",\n new StoreTracedTestCaseRequest\n {\n Result = new TestCaseResultWithStdout\n {\n Result = new TestCaseResult\n {\n ExpectedResult = 1,\n ActualResult = 1,\n Passed = true,\n },\n Stdout = \"stdout\",\n },\n TraceResponses = new List()\n {\n new TraceResponse\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n ReturnValue = null,\n ExpressionLocation = null,\n Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null },\n Stdout = null,\n },\n new TraceResponse\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n ReturnValue = null,\n ExpressionLocation = null,\n Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null },\n Stdout = null,\n },\n },\n }\n);\n" + "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Admin.StoreTracedTestCaseAsync(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"testCaseId\",\n new StoreTracedTestCaseRequest\n {\n Result = new TestCaseResultWithStdout\n {\n Result = new TestCaseResult\n {\n ExpectedResult = 1,\n ActualResult = 1,\n Passed = true,\n },\n Stdout = \"stdout\",\n },\n TraceResponses = new List()\n {\n new TraceResponse\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n ReturnValue = 1,\n ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 },\n Stack = new StackInformation\n {\n NumStackFrames = 1,\n TopStackFrame = new StackFrame\n {\n MethodName = \"methodName\",\n LineNumber = 1,\n Scopes = new List()\n {\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n },\n },\n },\n Stdout = \"stdout\",\n },\n new TraceResponse\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n ReturnValue = 1,\n ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 },\n Stack = new StackInformation\n {\n NumStackFrames = 1,\n TopStackFrame = new StackFrame\n {\n MethodName = \"methodName\",\n LineNumber = 1,\n Scopes = new List()\n {\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n },\n },\n },\n Stdout = \"stdout\",\n },\n },\n }\n);\n" } }, { @@ -82,7 +82,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Admin.StoreTracedTestCaseV2Async(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"testCaseId\",\n new List()\n {\n new TraceResponseV2\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n File = new TracedFile { Filename = \"filename\", Directory = \"directory\" },\n ReturnValue = null,\n ExpressionLocation = null,\n Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null },\n Stdout = null,\n },\n new TraceResponseV2\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n File = new TracedFile { Filename = \"filename\", Directory = \"directory\" },\n ReturnValue = null,\n ExpressionLocation = null,\n Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null },\n Stdout = null,\n },\n }\n);\n" + "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Admin.StoreTracedTestCaseV2Async(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"testCaseId\",\n new List()\n {\n new TraceResponseV2\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n File = new TracedFile { Filename = \"filename\", Directory = \"directory\" },\n ReturnValue = 1,\n ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 },\n Stack = new StackInformation\n {\n NumStackFrames = 1,\n TopStackFrame = new StackFrame\n {\n MethodName = \"methodName\",\n LineNumber = 1,\n Scopes = new List()\n {\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n },\n },\n },\n Stdout = \"stdout\",\n },\n new TraceResponseV2\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n File = new TracedFile { Filename = \"filename\", Directory = \"directory\" },\n ReturnValue = 1,\n ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 },\n Stack = new StackInformation\n {\n NumStackFrames = 1,\n TopStackFrame = new StackFrame\n {\n MethodName = \"methodName\",\n LineNumber = 1,\n Scopes = new List()\n {\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n },\n },\n },\n Stdout = \"stdout\",\n },\n }\n);\n" } }, { @@ -94,7 +94,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Admin.StoreTracedWorkspaceAsync(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n new StoreTracedWorkspaceRequest\n {\n WorkspaceRunDetails = new WorkspaceRunDetails\n {\n ExceptionV2 = null,\n Exception = null,\n Stdout = \"stdout\",\n },\n TraceResponses = new List()\n {\n new TraceResponse\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n ReturnValue = null,\n ExpressionLocation = null,\n Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null },\n Stdout = null,\n },\n new TraceResponse\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n ReturnValue = null,\n ExpressionLocation = null,\n Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null },\n Stdout = null,\n },\n },\n }\n);\n" + "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Admin.StoreTracedWorkspaceAsync(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n new StoreTracedWorkspaceRequest\n {\n WorkspaceRunDetails = new WorkspaceRunDetails\n {\n ExceptionV2 = new ExceptionInfo\n {\n ExceptionType = \"exceptionType\",\n ExceptionMessage = \"exceptionMessage\",\n ExceptionStacktrace = \"exceptionStacktrace\",\n },\n Exception = new ExceptionInfo\n {\n ExceptionType = \"exceptionType\",\n ExceptionMessage = \"exceptionMessage\",\n ExceptionStacktrace = \"exceptionStacktrace\",\n },\n Stdout = \"stdout\",\n },\n TraceResponses = new List()\n {\n new TraceResponse\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n ReturnValue = 1,\n ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 },\n Stack = new StackInformation\n {\n NumStackFrames = 1,\n TopStackFrame = new StackFrame\n {\n MethodName = \"methodName\",\n LineNumber = 1,\n Scopes = new List()\n {\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n },\n },\n },\n Stdout = \"stdout\",\n },\n new TraceResponse\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n ReturnValue = 1,\n ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 },\n Stack = new StackInformation\n {\n NumStackFrames = 1,\n TopStackFrame = new StackFrame\n {\n MethodName = \"methodName\",\n LineNumber = 1,\n Scopes = new List()\n {\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n },\n },\n },\n Stdout = \"stdout\",\n },\n },\n }\n);\n" } }, { @@ -106,7 +106,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Admin.StoreTracedWorkspaceV2Async(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n new List()\n {\n new TraceResponseV2\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n File = new TracedFile { Filename = \"filename\", Directory = \"directory\" },\n ReturnValue = null,\n ExpressionLocation = null,\n Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null },\n Stdout = null,\n },\n new TraceResponseV2\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n File = new TracedFile { Filename = \"filename\", Directory = \"directory\" },\n ReturnValue = null,\n ExpressionLocation = null,\n Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null },\n Stdout = null,\n },\n }\n);\n" + "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Admin.StoreTracedWorkspaceV2Async(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n new List()\n {\n new TraceResponseV2\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n File = new TracedFile { Filename = \"filename\", Directory = \"directory\" },\n ReturnValue = 1,\n ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 },\n Stack = new StackInformation\n {\n NumStackFrames = 1,\n TopStackFrame = new StackFrame\n {\n MethodName = \"methodName\",\n LineNumber = 1,\n Scopes = new List()\n {\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n },\n },\n },\n Stdout = \"stdout\",\n },\n new TraceResponseV2\n {\n SubmissionId = \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n LineNumber = 1,\n File = new TracedFile { Filename = \"filename\", Directory = \"directory\" },\n ReturnValue = 1,\n ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 },\n Stack = new StackInformation\n {\n NumStackFrames = 1,\n TopStackFrame = new StackFrame\n {\n MethodName = \"methodName\",\n LineNumber = 1,\n Scopes = new List()\n {\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n new Scope\n {\n Variables = new Dictionary() { { \"variables\", 1 } },\n },\n },\n },\n },\n Stdout = \"stdout\",\n },\n }\n);\n" } }, { @@ -154,7 +154,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Playlist.CreatePlaylistAsync(\n 1,\n new CreatePlaylistRequest\n {\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Body = new PlaylistCreateRequest\n {\n Name = \"name\",\n Problems = new List() { \"problems\", \"problems\" },\n },\n }\n);\n" + "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Playlist.CreatePlaylistAsync(\n 1,\n new CreatePlaylistRequest\n {\n Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n OptionalDatetime = new DateTime(2024, 01, 15, 09, 30, 00, 000),\n Body = new PlaylistCreateRequest\n {\n Name = \"name\",\n Problems = new List() { \"problems\", \"problems\" },\n },\n }\n);\n" } }, { @@ -166,7 +166,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Playlist.GetPlaylistsAsync(\n 1,\n new GetPlaylistsRequest\n {\n OtherField = \"otherField\",\n MultiLineDocs = \"multiLineDocs\",\n MultipleField = [\"multipleField\"],\n }\n);\n" + "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Playlist.GetPlaylistsAsync(\n 1,\n new GetPlaylistsRequest\n {\n Limit = 1,\n OtherField = \"otherField\",\n MultiLineDocs = \"multiLineDocs\",\n OptionalMultipleField = [\"optionalMultipleField\"],\n MultipleField = [\"multipleField\"],\n }\n);\n" } }, { @@ -190,7 +190,7 @@ }, "snippet": { "type": "typescript", - "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Playlist.UpdatePlaylistAsync(1, \"playlistId\", null);\n" + "client": "using SeedTrace;\n\nvar client = new SeedTraceClient(\"TOKEN\");\nawait client.Playlist.UpdatePlaylistAsync(\n 1,\n \"playlistId\",\n new UpdatePlaylistRequest\n {\n Name = \"name\",\n Problems = new List() { \"problems\", \"problems\" },\n }\n);\n" } }, { diff --git a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/CreatePlaylistTest.cs b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/CreatePlaylistTest.cs index b473fbe7c69..d4f02f9f353 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/CreatePlaylistTest.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/CreatePlaylistTest.cs @@ -39,6 +39,7 @@ public async Task MockServerTest() .RequestBuilders.Request.Create() .WithPath("/v2/playlist/1/create") .WithParam("datetime", "2024-01-15T09:30:00.000Z") + .WithParam("optionalDatetime", "2024-01-15T09:30:00.000Z") .UsingPost() .WithBodyAsJson(requestJson) ) @@ -58,6 +59,11 @@ public async Task MockServerTest() null, DateTimeStyles.AdjustToUniversal ), + OptionalDatetime = DateTime.Parse( + "2024-01-15T09:30:00.000Z", + null, + DateTimeStyles.AdjustToUniversal + ), Body = new PlaylistCreateRequest { Name = "name", diff --git a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/GetPlaylistsTest.cs b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/GetPlaylistsTest.cs index ad38512002a..719c6032545 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/GetPlaylistsTest.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/GetPlaylistsTest.cs @@ -33,8 +33,10 @@ public async Task MockServerTest() WireMock .RequestBuilders.Request.Create() .WithPath("/v2/playlist/1/all") + .WithParam("limit", "1") .WithParam("otherField", "otherField") .WithParam("multiLineDocs", "multiLineDocs") + .WithParam("optionalMultipleField", "optionalMultipleField") .WithParam("multipleField", "multipleField") .UsingGet() ) @@ -49,8 +51,10 @@ public async Task MockServerTest() 1, new GetPlaylistsRequest { + Limit = 1, OtherField = "otherField", MultiLineDocs = "multiLineDocs", + OptionalMultipleField = ["optionalMultipleField"], MultipleField = ["multipleField"], }, RequestOptions diff --git a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedTestCaseTest.cs b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedTestCaseTest.cs index d1adbcec051..e7c860f8dbf 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedTestCaseTest.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedTestCaseTest.cs @@ -34,16 +34,78 @@ public void MockServerTest() { "submissionId": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "lineNumber": 1, + "returnValue": { + "type": "integerValue", + "value": 1 + }, + "expressionLocation": { + "start": 1, + "offset": 1 + }, "stack": { - "numStackFrames": 1 - } + "numStackFrames": 1, + "topStackFrame": { + "methodName": "methodName", + "lineNumber": 1, + "scopes": [ + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + }, + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + } + ] + } + }, + "stdout": "stdout" }, { "submissionId": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "lineNumber": 1, + "returnValue": { + "type": "integerValue", + "value": 1 + }, + "expressionLocation": { + "start": 1, + "offset": 1 + }, "stack": { - "numStackFrames": 1 - } + "numStackFrames": 1, + "topStackFrame": { + "methodName": "methodName", + "lineNumber": 1, + "scopes": [ + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + }, + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + } + ] + } + }, + "stdout": "stdout" } ] } @@ -84,27 +146,77 @@ await Client.Admin.StoreTracedTestCaseAsync( { SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, - ReturnValue = null, - ExpressionLocation = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation + { + Start = 1, + Offset = 1, + }, Stack = new StackInformation { NumStackFrames = 1, - TopStackFrame = null, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + }, + }, }, - Stdout = null, + Stdout = "stdout", }, new TraceResponse { SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, - ReturnValue = null, - ExpressionLocation = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation + { + Start = 1, + Offset = 1, + }, Stack = new StackInformation { NumStackFrames = 1, - TopStackFrame = null, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + }, + }, }, - Stdout = null, + Stdout = "stdout", }, }, }, diff --git a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedTestCaseV2Test.cs b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedTestCaseV2Test.cs index ffcda90a01d..1571bef498a 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedTestCaseV2Test.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedTestCaseV2Test.cs @@ -20,9 +20,40 @@ public void MockServerTest() "filename": "filename", "directory": "directory" }, + "returnValue": { + "type": "integerValue", + "value": 1 + }, + "expressionLocation": { + "start": 1, + "offset": 1 + }, "stack": { - "numStackFrames": 1 - } + "numStackFrames": 1, + "topStackFrame": { + "methodName": "methodName", + "lineNumber": 1, + "scopes": [ + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + }, + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + } + ] + } + }, + "stdout": "stdout" }, { "submissionId": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", @@ -31,9 +62,40 @@ public void MockServerTest() "filename": "filename", "directory": "directory" }, + "returnValue": { + "type": "integerValue", + "value": 1 + }, + "expressionLocation": { + "start": 1, + "offset": 1 + }, "stack": { - "numStackFrames": 1 - } + "numStackFrames": 1, + "topStackFrame": { + "methodName": "methodName", + "lineNumber": 1, + "scopes": [ + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + }, + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + } + ] + } + }, + "stdout": "stdout" } ] """; @@ -66,14 +128,35 @@ await Client.Admin.StoreTracedTestCaseV2Async( Filename = "filename", Directory = "directory", }, - ReturnValue = null, - ExpressionLocation = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, Stack = new StackInformation { NumStackFrames = 1, - TopStackFrame = null, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + }, + }, }, - Stdout = null, + Stdout = "stdout", }, new TraceResponseV2 { @@ -84,14 +167,35 @@ await Client.Admin.StoreTracedTestCaseV2Async( Filename = "filename", Directory = "directory", }, - ReturnValue = null, - ExpressionLocation = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, Stack = new StackInformation { NumStackFrames = 1, - TopStackFrame = null, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + }, + }, }, - Stdout = null, + Stdout = "stdout", }, }, RequestOptions diff --git a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedWorkspaceTest.cs b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedWorkspaceTest.cs index 843220cd1c9..2ee1831cfdc 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedWorkspaceTest.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedWorkspaceTest.cs @@ -14,22 +14,95 @@ public void MockServerTest() const string requestJson = """ { "workspaceRunDetails": { + "exceptionV2": { + "type": "generic", + "exceptionType": "exceptionType", + "exceptionMessage": "exceptionMessage", + "exceptionStacktrace": "exceptionStacktrace" + }, + "exception": { + "exceptionType": "exceptionType", + "exceptionMessage": "exceptionMessage", + "exceptionStacktrace": "exceptionStacktrace" + }, "stdout": "stdout" }, "traceResponses": [ { "submissionId": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "lineNumber": 1, + "returnValue": { + "type": "integerValue", + "value": 1 + }, + "expressionLocation": { + "start": 1, + "offset": 1 + }, "stack": { - "numStackFrames": 1 - } + "numStackFrames": 1, + "topStackFrame": { + "methodName": "methodName", + "lineNumber": 1, + "scopes": [ + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + }, + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + } + ] + } + }, + "stdout": "stdout" }, { "submissionId": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "lineNumber": 1, + "returnValue": { + "type": "integerValue", + "value": 1 + }, + "expressionLocation": { + "start": 1, + "offset": 1 + }, "stack": { - "numStackFrames": 1 - } + "numStackFrames": 1, + "topStackFrame": { + "methodName": "methodName", + "lineNumber": 1, + "scopes": [ + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + }, + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + } + ] + } + }, + "stdout": "stdout" } ] } @@ -55,8 +128,18 @@ await Client.Admin.StoreTracedWorkspaceAsync( { WorkspaceRunDetails = new WorkspaceRunDetails { - ExceptionV2 = null, - Exception = null, + ExceptionV2 = new ExceptionInfo + { + ExceptionType = "exceptionType", + ExceptionMessage = "exceptionMessage", + ExceptionStacktrace = "exceptionStacktrace", + }, + Exception = new ExceptionInfo + { + ExceptionType = "exceptionType", + ExceptionMessage = "exceptionMessage", + ExceptionStacktrace = "exceptionStacktrace", + }, Stdout = "stdout", }, TraceResponses = new List() @@ -65,27 +148,77 @@ await Client.Admin.StoreTracedWorkspaceAsync( { SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, - ReturnValue = null, - ExpressionLocation = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation + { + Start = 1, + Offset = 1, + }, Stack = new StackInformation { NumStackFrames = 1, - TopStackFrame = null, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + }, + }, }, - Stdout = null, + Stdout = "stdout", }, new TraceResponse { SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", LineNumber = 1, - ReturnValue = null, - ExpressionLocation = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation + { + Start = 1, + Offset = 1, + }, Stack = new StackInformation { NumStackFrames = 1, - TopStackFrame = null, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + }, + }, }, - Stdout = null, + Stdout = "stdout", }, }, }, diff --git a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedWorkspaceV2Test.cs b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedWorkspaceV2Test.cs index 1d5bb0a47c8..b8a5098f953 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedWorkspaceV2Test.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/StoreTracedWorkspaceV2Test.cs @@ -20,9 +20,40 @@ public void MockServerTest() "filename": "filename", "directory": "directory" }, + "returnValue": { + "type": "integerValue", + "value": 1 + }, + "expressionLocation": { + "start": 1, + "offset": 1 + }, "stack": { - "numStackFrames": 1 - } + "numStackFrames": 1, + "topStackFrame": { + "methodName": "methodName", + "lineNumber": 1, + "scopes": [ + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + }, + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + } + ] + } + }, + "stdout": "stdout" }, { "submissionId": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", @@ -31,9 +62,40 @@ public void MockServerTest() "filename": "filename", "directory": "directory" }, + "returnValue": { + "type": "integerValue", + "value": 1 + }, + "expressionLocation": { + "start": 1, + "offset": 1 + }, "stack": { - "numStackFrames": 1 - } + "numStackFrames": 1, + "topStackFrame": { + "methodName": "methodName", + "lineNumber": 1, + "scopes": [ + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + }, + { + "variables": { + "variables": { + "type": "integerValue", + "value": 1 + } + } + } + ] + } + }, + "stdout": "stdout" } ] """; @@ -65,14 +127,35 @@ await Client.Admin.StoreTracedWorkspaceV2Async( Filename = "filename", Directory = "directory", }, - ReturnValue = null, - ExpressionLocation = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, Stack = new StackInformation { NumStackFrames = 1, - TopStackFrame = null, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + }, + }, }, - Stdout = null, + Stdout = "stdout", }, new TraceResponseV2 { @@ -83,14 +166,35 @@ await Client.Admin.StoreTracedWorkspaceV2Async( Filename = "filename", Directory = "directory", }, - ReturnValue = null, - ExpressionLocation = null, + ReturnValue = 1, + ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, Stack = new StackInformation { NumStackFrames = 1, - TopStackFrame = null, + TopStackFrame = new StackFrame + { + MethodName = "methodName", + LineNumber = 1, + Scopes = new List() + { + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + new Scope + { + Variables = new Dictionary() + { + { "variables", 1 }, + }, + }, + }, + }, }, - Stdout = null, + Stdout = "stdout", }, }, RequestOptions diff --git a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/UpdatePlaylistTest.cs b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/UpdatePlaylistTest.cs index de90d228c3b..1218665b44d 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/UpdatePlaylistTest.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/UpdatePlaylistTest.cs @@ -2,6 +2,7 @@ using FluentAssertions.Json; using Newtonsoft.Json.Linq; using NUnit.Framework; +using SeedTrace; using SeedTrace.Core; #nullable enable @@ -15,7 +16,13 @@ public class UpdatePlaylistTest : BaseMockServerTest public async Task MockServerTest() { const string requestJson = """ - + { + "name": "name", + "problems": [ + "problems", + "problems" + ] + } """; const string mockResponse = """ @@ -31,7 +38,7 @@ public async Task MockServerTest() .RequestBuilders.Request.Create() .WithPath("/v2/playlist/1/playlistId") .UsingPut() - .WithBody(requestJson) + .WithBodyAsJson(requestJson) ) .RespondWith( WireMock @@ -43,7 +50,11 @@ public async Task MockServerTest() var response = await Client.Playlist.UpdatePlaylistAsync( 1, "playlistId", - null, + new UpdatePlaylistRequest + { + Name = "name", + Problems = new List() { "problems", "problems" }, + }, RequestOptions ); JToken diff --git a/seed/csharp-sdk/trace/src/SeedTrace/Admin/AdminClient.cs b/seed/csharp-sdk/trace/src/SeedTrace/Admin/AdminClient.cs index 6763b4292a5..d9b64cf0d55 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace/Admin/AdminClient.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace/Admin/AdminClient.cs @@ -199,19 +199,57 @@ public async Task SendWorkspaceSubmissionUpdateAsync( /// { /// SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", /// LineNumber = 1, - /// ReturnValue = null, - /// ExpressionLocation = null, - /// Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - /// Stdout = null, + /// ReturnValue = 1, + /// ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + /// Stack = new StackInformation + /// { + /// NumStackFrames = 1, + /// TopStackFrame = new StackFrame + /// { + /// MethodName = "methodName", + /// LineNumber = 1, + /// Scopes = new List<Scope>() + /// { + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// }, + /// }, + /// }, + /// Stdout = "stdout", /// }, /// new TraceResponse /// { /// SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", /// LineNumber = 1, - /// ReturnValue = null, - /// ExpressionLocation = null, - /// Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - /// Stdout = null, + /// ReturnValue = 1, + /// ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + /// Stack = new StackInformation + /// { + /// NumStackFrames = 1, + /// TopStackFrame = new StackFrame + /// { + /// MethodName = "methodName", + /// LineNumber = 1, + /// Scopes = new List<Scope>() + /// { + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// }, + /// }, + /// }, + /// Stdout = "stdout", /// }, /// }, /// } @@ -261,20 +299,58 @@ public async Task StoreTracedTestCaseAsync( /// SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", /// LineNumber = 1, /// File = new TracedFile { Filename = "filename", Directory = "directory" }, - /// ReturnValue = null, - /// ExpressionLocation = null, - /// Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - /// Stdout = null, + /// ReturnValue = 1, + /// ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + /// Stack = new StackInformation + /// { + /// NumStackFrames = 1, + /// TopStackFrame = new StackFrame + /// { + /// MethodName = "methodName", + /// LineNumber = 1, + /// Scopes = new List<Scope>() + /// { + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// }, + /// }, + /// }, + /// Stdout = "stdout", /// }, /// new TraceResponseV2 /// { /// SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", /// LineNumber = 1, /// File = new TracedFile { Filename = "filename", Directory = "directory" }, - /// ReturnValue = null, - /// ExpressionLocation = null, - /// Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - /// Stdout = null, + /// ReturnValue = 1, + /// ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + /// Stack = new StackInformation + /// { + /// NumStackFrames = 1, + /// TopStackFrame = new StackFrame + /// { + /// MethodName = "methodName", + /// LineNumber = 1, + /// Scopes = new List<Scope>() + /// { + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// }, + /// }, + /// }, + /// Stdout = "stdout", /// }, /// } /// ); @@ -320,8 +396,18 @@ public async Task StoreTracedTestCaseV2Async( /// { /// WorkspaceRunDetails = new WorkspaceRunDetails /// { - /// ExceptionV2 = null, - /// Exception = null, + /// ExceptionV2 = new ExceptionInfo + /// { + /// ExceptionType = "exceptionType", + /// ExceptionMessage = "exceptionMessage", + /// ExceptionStacktrace = "exceptionStacktrace", + /// }, + /// Exception = new ExceptionInfo + /// { + /// ExceptionType = "exceptionType", + /// ExceptionMessage = "exceptionMessage", + /// ExceptionStacktrace = "exceptionStacktrace", + /// }, /// Stdout = "stdout", /// }, /// TraceResponses = new List<TraceResponse>() @@ -330,19 +416,57 @@ public async Task StoreTracedTestCaseV2Async( /// { /// SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", /// LineNumber = 1, - /// ReturnValue = null, - /// ExpressionLocation = null, - /// Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - /// Stdout = null, + /// ReturnValue = 1, + /// ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + /// Stack = new StackInformation + /// { + /// NumStackFrames = 1, + /// TopStackFrame = new StackFrame + /// { + /// MethodName = "methodName", + /// LineNumber = 1, + /// Scopes = new List<Scope>() + /// { + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// }, + /// }, + /// }, + /// Stdout = "stdout", /// }, /// new TraceResponse /// { /// SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", /// LineNumber = 1, - /// ReturnValue = null, - /// ExpressionLocation = null, - /// Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - /// Stdout = null, + /// ReturnValue = 1, + /// ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + /// Stack = new StackInformation + /// { + /// NumStackFrames = 1, + /// TopStackFrame = new StackFrame + /// { + /// MethodName = "methodName", + /// LineNumber = 1, + /// Scopes = new List<Scope>() + /// { + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// }, + /// }, + /// }, + /// Stdout = "stdout", /// }, /// }, /// } @@ -390,20 +514,58 @@ public async Task StoreTracedWorkspaceAsync( /// SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", /// LineNumber = 1, /// File = new TracedFile { Filename = "filename", Directory = "directory" }, - /// ReturnValue = null, - /// ExpressionLocation = null, - /// Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - /// Stdout = null, + /// ReturnValue = 1, + /// ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + /// Stack = new StackInformation + /// { + /// NumStackFrames = 1, + /// TopStackFrame = new StackFrame + /// { + /// MethodName = "methodName", + /// LineNumber = 1, + /// Scopes = new List<Scope>() + /// { + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// }, + /// }, + /// }, + /// Stdout = "stdout", /// }, /// new TraceResponseV2 /// { /// SubmissionId = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", /// LineNumber = 1, /// File = new TracedFile { Filename = "filename", Directory = "directory" }, - /// ReturnValue = null, - /// ExpressionLocation = null, - /// Stack = new StackInformation { NumStackFrames = 1, TopStackFrame = null }, - /// Stdout = null, + /// ReturnValue = 1, + /// ExpressionLocation = new ExpressionLocation { Start = 1, Offset = 1 }, + /// Stack = new StackInformation + /// { + /// NumStackFrames = 1, + /// TopStackFrame = new StackFrame + /// { + /// MethodName = "methodName", + /// LineNumber = 1, + /// Scopes = new List<Scope>() + /// { + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// new Scope + /// { + /// Variables = new Dictionary<string, object>() { { "variables", 1 } }, + /// }, + /// }, + /// }, + /// }, + /// Stdout = "stdout", /// }, /// } /// ); diff --git a/seed/csharp-sdk/trace/src/SeedTrace/Playlist/PlaylistClient.cs b/seed/csharp-sdk/trace/src/SeedTrace/Playlist/PlaylistClient.cs index 83c472d0e3b..fe856c661af 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace/Playlist/PlaylistClient.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace/Playlist/PlaylistClient.cs @@ -27,6 +27,7 @@ internal PlaylistClient(RawClient client) /// new CreatePlaylistRequest /// { /// Datetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), + /// OptionalDatetime = new DateTime(2024, 01, 15, 09, 30, 00, 000), /// Body = new PlaylistCreateRequest /// { /// Name = "name", @@ -92,8 +93,10 @@ public async Task CreatePlaylistAsync( /// 1, /// new GetPlaylistsRequest /// { + /// Limit = 1, /// OtherField = "otherField", /// MultiLineDocs = "multiLineDocs", + /// OptionalMultipleField = ["optionalMultipleField"], /// MultipleField = ["multipleField"], /// } /// ); @@ -196,7 +199,15 @@ public async Task GetPlaylistAsync( /// /// /// - /// await client.Playlist.UpdatePlaylistAsync(1, "playlistId", null); + /// await client.Playlist.UpdatePlaylistAsync( + /// 1, + /// "playlistId", + /// new UpdatePlaylistRequest + /// { + /// Name = "name", + /// Problems = new List<string>() { "problems", "problems" }, + /// } + /// ); /// /// public async Task UpdatePlaylistAsync( diff --git a/seed/fastapi/grpc-proto-exhaustive/.mock/generators.yml b/seed/fastapi/grpc-proto-exhaustive/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/fastapi/grpc-proto-exhaustive/.mock/generators.yml +++ b/seed/fastapi/grpc-proto-exhaustive/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/fastapi/grpc-proto-exhaustive/.mock/openapi/openapi.yml b/seed/fastapi/grpc-proto-exhaustive/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/fastapi/grpc-proto-exhaustive/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/fastapi/grpc-proto-exhaustive/__init__.py b/seed/fastapi/grpc-proto-exhaustive/__init__.py index f6880eeb568..5d12cddf903 100644 --- a/seed/fastapi/grpc-proto-exhaustive/__init__.py +++ b/seed/fastapi/grpc-proto-exhaustive/__init__.py @@ -8,6 +8,7 @@ UploadRequest, dataservice, ) +from .security import ApiAuth from .types import ( Column, DeleteResponse, @@ -30,6 +31,7 @@ ) __all__ = [ + "ApiAuth", "Column", "DeleteRequest", "DeleteResponse", diff --git a/seed/fastapi/grpc-proto-exhaustive/resources/dataservice/service/service.py b/seed/fastapi/grpc-proto-exhaustive/resources/dataservice/service/service.py index ad37342c366..c4ee4269b48 100644 --- a/seed/fastapi/grpc-proto-exhaustive/resources/dataservice/service/service.py +++ b/seed/fastapi/grpc-proto-exhaustive/resources/dataservice/service/service.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from ....core.abstract_fern_service import AbstractFernService +from ....security import ApiAuth +import typing +import abc from .upload_request import UploadRequest from ....types.upload_response import UploadResponse -import abc from .delete_request import DeleteRequest from ....types.delete_response import DeleteResponse from .describe_request import DescribeRequest from ....types.describe_response import DescribeResponse -import typing from ....types.fetch_response import FetchResponse from ....types.list_response import ListResponse from .query_request import QueryRequest @@ -17,6 +18,7 @@ from ....types.update_response import UpdateResponse import fastapi import inspect +from ....security import FernAuth from ....core.exceptions.fern_http_exception import FernHTTPException import logging import functools @@ -32,6 +34,11 @@ class AbstractDataserviceService(AbstractFernService): function. """ + @abc.abstractmethod + def foo( + self, *, auth: ApiAuth + ) -> typing.Dict[str, typing.Optional[typing.Any]]: ... + @abc.abstractmethod def upload(self, *, body: UploadRequest) -> UploadResponse: ... @@ -72,6 +79,7 @@ def update(self, *, body: UpdateRequest) -> UpdateResponse: ... @classmethod def _init_fern(cls, router: fastapi.APIRouter) -> None: + cls.__init_foo(router=router) cls.__init_upload(router=router) cls.__init_delete(router=router) cls.__init_describe(router=router) @@ -80,6 +88,52 @@ def _init_fern(cls, router: fastapi.APIRouter) -> None: cls.__init_query(router=router) cls.__init_update(router=router) + @classmethod + def __init_foo(cls, router: fastapi.APIRouter) -> None: + endpoint_function = inspect.signature(cls.foo) + new_parameters: typing.List[inspect.Parameter] = [] + for index, (parameter_name, parameter) in enumerate( + endpoint_function.parameters.items() + ): + if index == 0: + new_parameters.append(parameter.replace(default=fastapi.Depends(cls))) + elif parameter_name == "auth": + new_parameters.append( + parameter.replace(default=fastapi.Depends(FernAuth)) + ) + else: + new_parameters.append(parameter) + setattr( + cls.foo, + "__signature__", + endpoint_function.replace(parameters=new_parameters), + ) + + @functools.wraps(cls.foo) + def wrapper( + *args: typing.Any, **kwargs: typing.Any + ) -> typing.Dict[str, typing.Optional[typing.Any]]: + try: + return cls.foo(*args, **kwargs) + except FernHTTPException as e: + logging.getLogger(f"{cls.__module__}.{cls.__name__}").warn( + f"Endpoint 'foo' unexpectedly threw {e.__class__.__name__}. " + + f"If this was intentional, please add {e.__class__.__name__} to " + + "the endpoint's errors list in your Fern Definition." + ) + raise e + + # this is necessary for FastAPI to find forward-ref'ed type hints. + # https://github.com/tiangolo/fastapi/pull/5077 + wrapper.__globals__.update(cls.foo.__globals__) + + router.post( + path="/foo", + response_model=typing.Dict[str, typing.Optional[typing.Any]], + description=AbstractDataserviceService.foo.__doc__, + **get_route_args(cls.foo, default_tag="dataservice"), + )(wrapper) + @classmethod def __init_upload(cls, router: fastapi.APIRouter) -> None: endpoint_function = inspect.signature(cls.upload) diff --git a/seed/fastapi/grpc-proto-exhaustive/security.py b/seed/fastapi/grpc-proto-exhaustive/security.py new file mode 100644 index 00000000000..bbf34e45c13 --- /dev/null +++ b/seed/fastapi/grpc-proto-exhaustive/security.py @@ -0,0 +1,9 @@ +# This file was auto-generated by Fern from our API Definition. + +import fastapi + +ApiAuth = str + + +def FernAuth(auth: str = fastapi.Header(alias="X-API-Key")) -> str: + return auth diff --git a/seed/go-fiber/grpc-proto-exhaustive/.mock/generators.yml b/seed/go-fiber/grpc-proto-exhaustive/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/go-fiber/grpc-proto-exhaustive/.mock/generators.yml +++ b/seed/go-fiber/grpc-proto-exhaustive/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/go-fiber/grpc-proto-exhaustive/.mock/openapi/openapi.yml b/seed/go-fiber/grpc-proto-exhaustive/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/go-fiber/grpc-proto-exhaustive/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/go-model/grpc-proto-exhaustive/.mock/generators.yml b/seed/go-model/grpc-proto-exhaustive/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/go-model/grpc-proto-exhaustive/.mock/generators.yml +++ b/seed/go-model/grpc-proto-exhaustive/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/go-model/grpc-proto-exhaustive/.mock/openapi/openapi.yml b/seed/go-model/grpc-proto-exhaustive/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/go-model/grpc-proto-exhaustive/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/go-sdk/grpc-proto-exhaustive/.mock/generators.yml b/seed/go-sdk/grpc-proto-exhaustive/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/.mock/generators.yml +++ b/seed/go-sdk/grpc-proto-exhaustive/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/go-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml b/seed/go-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/go-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/go-sdk/grpc-proto-exhaustive/core/request_option.go b/seed/go-sdk/grpc-proto-exhaustive/core/request_option.go index b558ccc7b58..041ca0a5c30 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/core/request_option.go +++ b/seed/go-sdk/grpc-proto-exhaustive/core/request_option.go @@ -3,6 +3,7 @@ package core import ( + fmt "fmt" http "net/http" url "net/url" ) @@ -23,6 +24,7 @@ type RequestOptions struct { BodyProperties map[string]interface{} QueryParameters url.Values MaxAttempts uint + ApiKey string } // NewRequestOptions returns a new *RequestOptions value. @@ -43,7 +45,13 @@ func NewRequestOptions(opts ...RequestOption) *RequestOptions { // ToHeader maps the configured request options into a http.Header used // for the request(s). -func (r *RequestOptions) ToHeader() http.Header { return r.cloneHeader() } +func (r *RequestOptions) ToHeader() http.Header { + header := r.cloneHeader() + if r.ApiKey != "" { + header.Set("X-API-Key", fmt.Sprintf("%v", r.ApiKey)) + } + return header +} func (r *RequestOptions) cloneHeader() http.Header { headers := r.HTTPHeader.Clone() @@ -106,3 +114,12 @@ type MaxAttemptsOption struct { func (m *MaxAttemptsOption) applyRequestOptions(opts *RequestOptions) { opts.MaxAttempts = m.MaxAttempts } + +// ApiKeyOption implements the RequestOption interface. +type ApiKeyOption struct { + ApiKey string +} + +func (a *ApiKeyOption) applyRequestOptions(opts *RequestOptions) { + opts.ApiKey = a.ApiKey +} diff --git a/seed/go-sdk/grpc-proto-exhaustive/dataservice/client.go b/seed/go-sdk/grpc-proto-exhaustive/dataservice/client.go index 5c093d0701b..ce804fb0bff 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dataservice/client.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dataservice/client.go @@ -30,6 +30,42 @@ func NewClient(opts ...option.RequestOption) *Client { } } +func (c *Client) Foo( + ctx context.Context, + opts ...option.RequestOption, +) (map[string]interface{}, error) { + options := core.NewRequestOptions(opts...) + + baseURL := "https://localhost" + if c.baseURL != "" { + baseURL = c.baseURL + } + if options.BaseURL != "" { + baseURL = options.BaseURL + } + endpointURL := baseURL + "/foo" + + headers := core.MergeHeaders(c.header.Clone(), options.ToHeader()) + + var response map[string]interface{} + if err := c.caller.Call( + ctx, + &core.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + MaxAttempts: options.MaxAttempts, + Headers: headers, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, + }, + ); err != nil { + return nil, err + } + return response, nil +} + func (c *Client) Upload( ctx context.Context, request *fern.UploadRequest, @@ -37,7 +73,7 @@ func (c *Client) Upload( ) (*fern.UploadResponse, error) { options := core.NewRequestOptions(opts...) - baseURL := "" + baseURL := "https://localhost" if c.baseURL != "" { baseURL = c.baseURL } @@ -76,7 +112,7 @@ func (c *Client) Delete( ) (*fern.DeleteResponse, error) { options := core.NewRequestOptions(opts...) - baseURL := "" + baseURL := "https://localhost" if c.baseURL != "" { baseURL = c.baseURL } @@ -115,7 +151,7 @@ func (c *Client) Describe( ) (*fern.DescribeResponse, error) { options := core.NewRequestOptions(opts...) - baseURL := "" + baseURL := "https://localhost" if c.baseURL != "" { baseURL = c.baseURL } @@ -154,7 +190,7 @@ func (c *Client) Fetch( ) (*fern.FetchResponse, error) { options := core.NewRequestOptions(opts...) - baseURL := "" + baseURL := "https://localhost" if c.baseURL != "" { baseURL = c.baseURL } @@ -199,7 +235,7 @@ func (c *Client) List( ) (*fern.ListResponse, error) { options := core.NewRequestOptions(opts...) - baseURL := "" + baseURL := "https://localhost" if c.baseURL != "" { baseURL = c.baseURL } @@ -244,7 +280,7 @@ func (c *Client) Query( ) (*fern.QueryResponse, error) { options := core.NewRequestOptions(opts...) - baseURL := "" + baseURL := "https://localhost" if c.baseURL != "" { baseURL = c.baseURL } @@ -283,7 +319,7 @@ func (c *Client) Update( ) (*fern.UpdateResponse, error) { options := core.NewRequestOptions(opts...) - baseURL := "" + baseURL := "https://localhost" if c.baseURL != "" { baseURL = c.baseURL } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example0/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example0/snippet.go index 79f9e7be997..569c8747c98 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example0/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example0/snippet.go @@ -2,23 +2,17 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" - fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Upload( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Foo( context.TODO(), - &fern.UploadRequest{ - Columns: []*fern.Column{ - &fern.Column{ - Id: "id", - Values: []float64{ - 1.1, - }, - }, - }, - }, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example1/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example1/snippet.go index fcb02e89261..569c8747c98 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example1/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example1/snippet.go @@ -2,68 +2,17 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" - fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Upload( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Foo( context.TODO(), - &fern.UploadRequest{ - Columns: []*fern.Column{ - &fern.Column{ - Id: "id", - Values: []float64{ - 1.1, - 1.1, - }, - Metadata: &fern.Metadata{ - StringMetadataValueMap: map[string]*fern.MetadataValue{ - "metadata": &fern.MetadataValue{ - Double: 1.1, - }, - }, - }, - IndexedData: &fern.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, - }, - &fern.Column{ - Id: "id", - Values: []float64{ - 1.1, - 1.1, - }, - Metadata: &fern.Metadata{ - StringMetadataValueMap: map[string]*fern.MetadataValue{ - "metadata": &fern.MetadataValue{ - Double: 1.1, - }, - }, - }, - IndexedData: &fern.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, - }, - }, - Namespace: fern.String( - "namespace", - ), - }, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example10/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example10/snippet.go index 238ba15826d..a844ea3f4c2 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example10/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example10/snippet.go @@ -2,16 +2,19 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Query( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.List( context.TODO(), - &fern.QueryRequest{ - TopK: 1, - }, + &fern.ListRequest{}, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example11/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example11/snippet.go index 0b18781d36f..65f25a0f318 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example11/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example11/snippet.go @@ -2,109 +2,32 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Query( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.List( context.TODO(), - &fern.QueryRequest{ - Namespace: fern.String( - "namespace", + &fern.ListRequest{ + Prefix: fern.String( + "prefix", ), - TopK: 1, - Filter: &fern.Metadata{ - StringMetadataValueMap: map[string]*fern.MetadataValue{ - "filter": &fern.MetadataValue{ - Double: 1.1, - }, - }, - }, - IncludeValues: fern.Bool( - true, + Limit: fern.Int( + 1, ), - IncludeMetadata: fern.Bool( - true, + PaginationToken: fern.String( + "paginationToken", ), - Queries: []*fern.QueryColumn{ - &fern.QueryColumn{ - Values: []float64{ - 1.1, - 1.1, - }, - TopK: fern.Int( - 1, - ), - Namespace: fern.String( - "namespace", - ), - Filter: &fern.Metadata{ - StringMetadataValueMap: map[string]*fern.MetadataValue{ - "filter": &fern.MetadataValue{ - Double: 1.1, - }, - }, - }, - IndexedData: &fern.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, - }, - &fern.QueryColumn{ - Values: []float64{ - 1.1, - 1.1, - }, - TopK: fern.Int( - 1, - ), - Namespace: fern.String( - "namespace", - ), - Filter: &fern.Metadata{ - StringMetadataValueMap: map[string]*fern.MetadataValue{ - "filter": &fern.MetadataValue{ - Double: 1.1, - }, - }, - }, - IndexedData: &fern.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, - }, - }, - Column: []float64{ - 1.1, - 1.1, - }, - Id: fern.String( - "id", + Namespace: fern.String( + "namespace", ), - IndexedData: &fern.IndexedData{ - Indices: []int{ - 1, - 1, - }, - Values: []float64{ - 1.1, - 1.1, - }, - }, }, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example12/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example12/snippet.go index 505f7aad44b..3b653ac7f46 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example12/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example12/snippet.go @@ -2,16 +2,21 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Update( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Query( context.TODO(), - &fern.UpdateRequest{ - Id: "id", + &fern.QueryRequest{ + TopK: 1, }, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example13/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example13/snippet.go index 60b7abb6f5d..57bf407e009 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example13/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example13/snippet.go @@ -2,29 +2,103 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Update( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Query( context.TODO(), - &fern.UpdateRequest{ - Id: "id", - Values: []float64{ - 1.1, - 1.1, - }, - SetMetadata: &fern.Metadata{ + &fern.QueryRequest{ + Namespace: fern.String( + "namespace", + ), + TopK: 1, + Filter: &fern.Metadata{ StringMetadataValueMap: map[string]*fern.MetadataValue{ - "setMetadata": &fern.MetadataValue{ + "filter": &fern.MetadataValue{ Double: 1.1, }, }, }, - Namespace: fern.String( - "namespace", + IncludeValues: fern.Bool( + true, + ), + IncludeMetadata: fern.Bool( + true, + ), + Queries: []*fern.QueryColumn{ + &fern.QueryColumn{ + Values: []float64{ + 1.1, + 1.1, + }, + TopK: fern.Int( + 1, + ), + Namespace: fern.String( + "namespace", + ), + Filter: &fern.Metadata{ + StringMetadataValueMap: map[string]*fern.MetadataValue{ + "filter": &fern.MetadataValue{ + Double: 1.1, + }, + }, + }, + IndexedData: &fern.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, + }, + &fern.QueryColumn{ + Values: []float64{ + 1.1, + 1.1, + }, + TopK: fern.Int( + 1, + ), + Namespace: fern.String( + "namespace", + ), + Filter: &fern.Metadata{ + StringMetadataValueMap: map[string]*fern.MetadataValue{ + "filter": &fern.MetadataValue{ + Double: 1.1, + }, + }, + }, + IndexedData: &fern.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, + }, + }, + Column: []float64{ + 1.1, + 1.1, + }, + Id: fern.String( + "id", ), IndexedData: &fern.IndexedData{ Indices: []int{ diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example14/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example14/snippet.go new file mode 100644 index 00000000000..547e2167858 --- /dev/null +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example14/snippet.go @@ -0,0 +1,22 @@ +package example + +import ( + client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" + context "context" + fern "github.com/grpc-proto-exhaustive/fern" +) + +func do() () { + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Update( + context.TODO(), + &fern.UpdateRequest{ + Id: "id", + }, + ) +} diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example15/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example15/snippet.go new file mode 100644 index 00000000000..6727ce2d16e --- /dev/null +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example15/snippet.go @@ -0,0 +1,46 @@ +package example + +import ( + client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" + context "context" + fern "github.com/grpc-proto-exhaustive/fern" +) + +func do() () { + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Update( + context.TODO(), + &fern.UpdateRequest{ + Id: "id", + Values: []float64{ + 1.1, + 1.1, + }, + SetMetadata: &fern.Metadata{ + StringMetadataValueMap: map[string]*fern.MetadataValue{ + "setMetadata": &fern.MetadataValue{ + Double: 1.1, + }, + }, + }, + Namespace: fern.String( + "namespace", + ), + IndexedData: &fern.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, + }, + ) +} diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example2/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example2/snippet.go index b25c652a645..8f941aecc89 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example2/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example2/snippet.go @@ -2,14 +2,28 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Delete( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Upload( context.TODO(), - &fern.DeleteRequest{}, + &fern.UploadRequest{ + Columns: []*fern.Column{ + &fern.Column{ + Id: "id", + Values: []float64{ + 1.1, + }, + }, + }, + }, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example3/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example3/snippet.go index 3dea14255ef..a02503edbb9 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example3/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example3/snippet.go @@ -2,32 +2,73 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Delete( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Upload( context.TODO(), - &fern.DeleteRequest{ - Ids: []string{ - "ids", - "ids", + &fern.UploadRequest{ + Columns: []*fern.Column{ + &fern.Column{ + Id: "id", + Values: []float64{ + 1.1, + 1.1, + }, + Metadata: &fern.Metadata{ + StringMetadataValueMap: map[string]*fern.MetadataValue{ + "metadata": &fern.MetadataValue{ + Double: 1.1, + }, + }, + }, + IndexedData: &fern.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, + }, + &fern.Column{ + Id: "id", + Values: []float64{ + 1.1, + 1.1, + }, + Metadata: &fern.Metadata{ + StringMetadataValueMap: map[string]*fern.MetadataValue{ + "metadata": &fern.MetadataValue{ + Double: 1.1, + }, + }, + }, + IndexedData: &fern.IndexedData{ + Indices: []int{ + 1, + 1, + }, + Values: []float64{ + 1.1, + 1.1, + }, + }, + }, }, - DeleteAll: fern.Bool( - true, - ), Namespace: fern.String( "namespace", ), - Filter: &fern.Metadata{ - StringMetadataValueMap: map[string]*fern.MetadataValue{ - "filter": &fern.MetadataValue{ - Double: 1.1, - }, - }, - }, }, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example4/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example4/snippet.go index 353e659ba4c..85dfefd270b 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example4/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example4/snippet.go @@ -2,14 +2,19 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Describe( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Delete( context.TODO(), - &fern.DescribeRequest{}, + &fern.DeleteRequest{}, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example5/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example5/snippet.go index a354b54b846..2c473a86a57 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example5/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example5/snippet.go @@ -2,15 +2,30 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Describe( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Delete( context.TODO(), - &fern.DescribeRequest{ + &fern.DeleteRequest{ + Ids: []string{ + "ids", + "ids", + }, + DeleteAll: fern.Bool( + true, + ), + Namespace: fern.String( + "namespace", + ), Filter: &fern.Metadata{ StringMetadataValueMap: map[string]*fern.MetadataValue{ "filter": &fern.MetadataValue{ diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example6/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example6/snippet.go index 4c87525c2c0..f04239e9b7f 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example6/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example6/snippet.go @@ -2,14 +2,19 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Fetch( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Describe( context.TODO(), - &fern.FetchRequest{}, + &fern.DescribeRequest{}, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example7/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example7/snippet.go index 121d5619871..ab562721877 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example7/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example7/snippet.go @@ -2,23 +2,27 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.Fetch( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Describe( context.TODO(), - &fern.FetchRequest{ - Ids: []*string{ - fern.String( - "ids", - ), + &fern.DescribeRequest{ + Filter: &fern.Metadata{ + StringMetadataValueMap: map[string]*fern.MetadataValue{ + "filter": &fern.MetadataValue{ + Double: 1.1, + }, + }, }, - Namespace: fern.String( - "namespace", - ), }, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example8/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example8/snippet.go index 14650a0c793..9e21345a9d1 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example8/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example8/snippet.go @@ -2,14 +2,19 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.List( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Fetch( context.TODO(), - &fern.ListRequest{}, + &fern.FetchRequest{}, ) } diff --git a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example9/snippet.go b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example9/snippet.go index 4d3b68c7168..ec65ea78e05 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example9/snippet.go +++ b/seed/go-sdk/grpc-proto-exhaustive/dynamic-snippets/example9/snippet.go @@ -2,24 +2,25 @@ package example import ( client "github.com/grpc-proto-exhaustive/fern/client" + option "github.com/grpc-proto-exhaustive/fern/option" context "context" fern "github.com/grpc-proto-exhaustive/fern" ) func do() () { - client := client.NewClient() - client.Dataservice.List( + client := client.NewClient( + option.WithApiKey( + "", + ), + ) + client.Dataservice.Fetch( context.TODO(), - &fern.ListRequest{ - Prefix: fern.String( - "prefix", - ), - Limit: fern.Int( - 1, - ), - PaginationToken: fern.String( - "paginationToken", - ), + &fern.FetchRequest{ + Ids: []*string{ + fern.String( + "ids", + ), + }, Namespace: fern.String( "namespace", ), diff --git a/seed/go-sdk/grpc-proto-exhaustive/environments.go b/seed/go-sdk/grpc-proto-exhaustive/environments.go new file mode 100644 index 00000000000..654f73c2254 --- /dev/null +++ b/seed/go-sdk/grpc-proto-exhaustive/environments.go @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +package api + +// Environments defines all of the API environments. +// These values can be used with the WithBaseURL +// RequestOption to override the client's default environment, +// if any. +var Environments = struct { + Default string +}{ + Default: "https://localhost", +} diff --git a/seed/go-sdk/grpc-proto-exhaustive/option/request_option.go b/seed/go-sdk/grpc-proto-exhaustive/option/request_option.go index 5cf734e7b24..0a9781f034e 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/option/request_option.go +++ b/seed/go-sdk/grpc-proto-exhaustive/option/request_option.go @@ -62,3 +62,10 @@ func WithMaxAttempts(attempts uint) *core.MaxAttemptsOption { MaxAttempts: attempts, } } + +// WithApiKey sets the apiKey auth request header. +func WithApiKey(apiKey string) *core.ApiKeyOption { + return &core.ApiKeyOption{ + ApiKey: apiKey, + } +} diff --git a/seed/go-sdk/grpc-proto-exhaustive/snippet.json b/seed/go-sdk/grpc-proto-exhaustive/snippet.json index 8d1dd886d21..fec7d94a819 100644 --- a/seed/go-sdk/grpc-proto-exhaustive/snippet.json +++ b/seed/go-sdk/grpc-proto-exhaustive/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Dataservice.Upload(\n\tcontext.TODO(),\n\t\u0026fern.UploadRequest{\n\t\tColumns: []*fern.Column{\n\t\t\t\u0026fern.Column{\n\t\t\t\tId: \"id\",\n\t\t\t\tValues: []float64{\n\t\t\t\t\t1.1,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n\toption \"github.com/grpc-proto-exhaustive/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithApiKey(\n\t\t\"\u003cYOUR_ApiKey\u003e\",\n\t),\n)\nresponse, err := client.Dataservice.Upload(\n\tcontext.TODO(),\n\t\u0026fern.UploadRequest{\n\t\tColumns: []*fern.Column{\n\t\t\t\u0026fern.Column{\n\t\t\t\tId: \"id\",\n\t\t\t\tValues: []float64{\n\t\t\t\t\t1.1,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n)\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Dataservice.Delete(\n\tcontext.TODO(),\n\t\u0026fern.DeleteRequest{},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n\toption \"github.com/grpc-proto-exhaustive/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithApiKey(\n\t\t\"\u003cYOUR_ApiKey\u003e\",\n\t),\n)\nresponse, err := client.Dataservice.Delete(\n\tcontext.TODO(),\n\t\u0026fern.DeleteRequest{},\n)\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Dataservice.Describe(\n\tcontext.TODO(),\n\t\u0026fern.DescribeRequest{},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n\toption \"github.com/grpc-proto-exhaustive/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithApiKey(\n\t\t\"\u003cYOUR_ApiKey\u003e\",\n\t),\n)\nresponse, err := client.Dataservice.Describe(\n\tcontext.TODO(),\n\t\u0026fern.DescribeRequest{},\n)\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Dataservice.Fetch(\n\tcontext.TODO(),\n\t\u0026fern.FetchRequest{},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n\toption \"github.com/grpc-proto-exhaustive/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithApiKey(\n\t\t\"\u003cYOUR_ApiKey\u003e\",\n\t),\n)\nresponse, err := client.Dataservice.Fetch(\n\tcontext.TODO(),\n\t\u0026fern.FetchRequest{},\n)\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Dataservice.List(\n\tcontext.TODO(),\n\t\u0026fern.ListRequest{},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n\toption \"github.com/grpc-proto-exhaustive/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithApiKey(\n\t\t\"\u003cYOUR_ApiKey\u003e\",\n\t),\n)\nresponse, err := client.Dataservice.List(\n\tcontext.TODO(),\n\t\u0026fern.ListRequest{},\n)\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Dataservice.Query(\n\tcontext.TODO(),\n\t\u0026fern.QueryRequest{\n\t\tTopK: 1,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n\toption \"github.com/grpc-proto-exhaustive/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithApiKey(\n\t\t\"\u003cYOUR_ApiKey\u003e\",\n\t),\n)\nresponse, err := client.Dataservice.Query(\n\tcontext.TODO(),\n\t\u0026fern.QueryRequest{\n\t\tTopK: 1,\n\t},\n)\n" } }, { @@ -74,7 +74,18 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Dataservice.Update(\n\tcontext.TODO(),\n\t\u0026fern.UpdateRequest{\n\t\tId: \"id\",\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/grpc-proto-exhaustive/fern\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n\toption \"github.com/grpc-proto-exhaustive/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithApiKey(\n\t\t\"\u003cYOUR_ApiKey\u003e\",\n\t),\n)\nresponse, err := client.Dataservice.Update(\n\tcontext.TODO(),\n\t\u0026fern.UpdateRequest{\n\t\tId: \"id\",\n\t},\n)\n" + } + }, + { + "id": { + "path": "/foo", + "method": "POST", + "identifier_override": "endpoint_dataservice.foo" + }, + "snippet": { + "type": "go", + "client": "import (\n\tcontext \"context\"\n\tfernclient \"github.com/grpc-proto-exhaustive/fern/client\"\n\toption \"github.com/grpc-proto-exhaustive/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithApiKey(\n\t\t\"\u003cYOUR_ApiKey\u003e\",\n\t),\n)\nresponse, err := client.Dataservice.Foo(\n\tcontext.TODO(),\n)\n" } } ] diff --git a/seed/php-model/grpc-proto-exhaustive/.mock/generators.yml b/seed/php-model/grpc-proto-exhaustive/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/php-model/grpc-proto-exhaustive/.mock/generators.yml +++ b/seed/php-model/grpc-proto-exhaustive/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/php-model/grpc-proto-exhaustive/.mock/openapi/openapi.yml b/seed/php-model/grpc-proto-exhaustive/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/php-model/grpc-proto-exhaustive/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/php-sdk/grpc-proto-exhaustive/.mock/generators.yml b/seed/php-sdk/grpc-proto-exhaustive/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/php-sdk/grpc-proto-exhaustive/.mock/generators.yml +++ b/seed/php-sdk/grpc-proto-exhaustive/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/php-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml b/seed/php-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/php-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/php-sdk/grpc-proto-exhaustive/src/Dataservice/DataserviceClient.php b/seed/php-sdk/grpc-proto-exhaustive/src/Dataservice/DataserviceClient.php index b7c93f9ef7a..69e79844853 100644 --- a/seed/php-sdk/grpc-proto-exhaustive/src/Dataservice/DataserviceClient.php +++ b/seed/php-sdk/grpc-proto-exhaustive/src/Dataservice/DataserviceClient.php @@ -3,14 +3,16 @@ namespace Seed\Dataservice; use Seed\Core\Client\RawClient; -use Seed\Dataservice\Requests\UploadRequest; -use Seed\Types\UploadResponse; use Seed\Exceptions\SeedException; use Seed\Exceptions\SeedApiException; use Seed\Core\Json\JsonApiRequest; +use Seed\Environments; use Seed\Core\Client\HttpMethod; +use Seed\Core\Json\JsonDecoder; use JsonException; use Psr\Http\Client\ClientExceptionInterface; +use Seed\Dataservice\Requests\UploadRequest; +use Seed\Types\UploadResponse; use Seed\Dataservice\Requests\DeleteRequest; use Seed\Types\DeleteResponse; use Seed\Dataservice\Requests\DescribeRequest; @@ -40,6 +42,41 @@ public function __construct( $this->client = $client; } + /** + * @param ?array{ + * baseUrl?: string, + * } $options + * @return array + * @throws SeedException + * @throws SeedApiException + */ + public function foo(?array $options = null): array + { + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "foo", + method: HttpMethod::POST, + ), + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, ['string' => 'mixed']); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new SeedException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (ClientExceptionInterface $e) { + throw new SeedException(message: $e->getMessage(), previous: $e); + } + throw new SeedApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + /** * @param UploadRequest $request * @param ?array{ @@ -54,7 +91,7 @@ public function upload(UploadRequest $request, ?array $options = null): UploadRe try { $response = $this->client->sendRequest( new JsonApiRequest( - baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, path: "data", method: HttpMethod::POST, body: $request, @@ -91,7 +128,7 @@ public function delete(DeleteRequest $request, ?array $options = null): DeleteRe try { $response = $this->client->sendRequest( new JsonApiRequest( - baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, path: "data/delete", method: HttpMethod::POST, body: $request, @@ -128,7 +165,7 @@ public function describe(DescribeRequest $request, ?array $options = null): Desc try { $response = $this->client->sendRequest( new JsonApiRequest( - baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, path: "data/describe", method: HttpMethod::POST, body: $request, @@ -172,7 +209,7 @@ public function fetch(FetchRequest $request, ?array $options = null): FetchRespo try { $response = $this->client->sendRequest( new JsonApiRequest( - baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, path: "data/fetch", method: HttpMethod::GET, query: $query, @@ -222,7 +259,7 @@ public function list(ListRequest $request, ?array $options = null): ListResponse try { $response = $this->client->sendRequest( new JsonApiRequest( - baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, path: "data/list", method: HttpMethod::GET, query: $query, @@ -259,7 +296,7 @@ public function query(QueryRequest $request, ?array $options = null): QueryRespo try { $response = $this->client->sendRequest( new JsonApiRequest( - baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, path: "data/query", method: HttpMethod::POST, body: $request, @@ -296,7 +333,7 @@ public function update(UpdateRequest $request, ?array $options = null): UpdateRe try { $response = $this->client->sendRequest( new JsonApiRequest( - baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, path: "data/update", method: HttpMethod::POST, body: $request, diff --git a/seed/php-sdk/grpc-proto-exhaustive/src/Environments.php b/seed/php-sdk/grpc-proto-exhaustive/src/Environments.php new file mode 100644 index 00000000000..8227b311410 --- /dev/null +++ b/seed/php-sdk/grpc-proto-exhaustive/src/Environments.php @@ -0,0 +1,8 @@ + 'Seed', 'X-Fern-SDK-Version' => '0.0.1', ]; + if ($apiKey != null) { + $defaultHeaders['X-API-Key'] = $apiKey; + } $this->options = $options ?? []; $this->options['headers'] = array_merge( diff --git a/seed/postman/grpc-proto-exhaustive/.mock/generators.yml b/seed/postman/grpc-proto-exhaustive/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/postman/grpc-proto-exhaustive/.mock/generators.yml +++ b/seed/postman/grpc-proto-exhaustive/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/postman/grpc-proto-exhaustive/.mock/openapi/openapi.yml b/seed/postman/grpc-proto-exhaustive/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/postman/grpc-proto-exhaustive/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/postman/grpc-proto-exhaustive/collection.json b/seed/postman/grpc-proto-exhaustive/collection.json index c0fea25880a..e9ec034ceb1 100644 --- a/seed/postman/grpc-proto-exhaustive/collection.json +++ b/seed/postman/grpc-proto-exhaustive/collection.json @@ -1,23 +1,159 @@ { "info": { - "name": "\"\"", + "name": "Test API", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": null }, "variable": [ { "key": "baseUrl", + "value": "https://localhost", + "type": "string" + }, + { + "key": "apiKey", "value": "", "type": "string" } ], - "auth": null, + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{apiKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-API-Key", + "type": "string" + }, + { + "key": "in", + "value": "header", + "type": "string" + } + ] + }, "item": [ { "_type": "container", "description": null, "name": "DataService", "item": [ + { + "_type": "endpoint", + "name": "Foo", + "request": { + "description": null, + "url": { + "raw": "{{baseUrl}}/foo", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "foo" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, + { + "type": "text", + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": null + }, + "response": [ + { + "name": "Success", + "status": "OK", + "code": 200, + "originalRequest": { + "description": null, + "url": { + "raw": "{{baseUrl}}/foo", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "foo" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, + { + "type": "text", + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": null + }, + "description": null, + "body": "{\n \"key\": \"value\"\n}", + "_postman_previewlanguage": "json" + }, + { + "name": "Success", + "status": "OK", + "code": 200, + "originalRequest": { + "description": null, + "url": { + "raw": "{{baseUrl}}/foo", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "foo" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, + { + "type": "text", + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": null + }, + "description": null, + "body": "{\n \"string\": {\n \"key\": \"value\"\n }\n}", + "_postman_previewlanguage": "json" + } + ] + }, { "_type": "endpoint", "name": "Upload", @@ -35,6 +171,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -72,6 +214,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -112,6 +260,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -154,6 +308,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -192,6 +352,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -233,6 +399,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -275,6 +447,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -313,6 +491,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -354,6 +538,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -396,6 +586,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -426,6 +622,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -470,6 +672,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -504,6 +712,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -534,6 +748,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -588,6 +808,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -622,6 +848,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -660,6 +892,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -701,6 +939,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -743,6 +987,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -781,6 +1031,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", @@ -822,6 +1078,12 @@ "variable": [] }, "header": [ + { + "key": "X-API-Key", + "value": "{{apiKey}}", + "type": "string", + "description": null + }, { "type": "text", "key": "Content-Type", diff --git a/seed/pydantic/grpc-proto-exhaustive/.mock/generators.yml b/seed/pydantic/grpc-proto-exhaustive/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/pydantic/grpc-proto-exhaustive/.mock/generators.yml +++ b/seed/pydantic/grpc-proto-exhaustive/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/pydantic/grpc-proto-exhaustive/.mock/openapi/openapi.yml b/seed/pydantic/grpc-proto-exhaustive/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/pydantic/grpc-proto-exhaustive/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.github/workflows/ci.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.github/workflows/ci.yml new file mode 100644 index 00000000000..b7316b8cab7 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.github/workflows/ci.yml @@ -0,0 +1,63 @@ +name: ci + +on: [push] +jobs: + compile: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Set up python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - name: Bootstrap poetry + run: | + curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 + - name: Install dependencies + run: poetry install + - name: Compile + run: poetry run mypy . + test: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Set up python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - name: Bootstrap poetry + run: | + curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 + - name: Install dependencies + run: poetry install + + - name: Install Fern + run: npm install -g fern-api + - name: Test + run: fern test --command "poetry run pytest -rP ." + + publish: + needs: [compile, test] + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-20.04 + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Set up python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - name: Bootstrap poetry + run: | + curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 + - name: Install dependencies + run: poetry install + - name: Publish to pypi + run: | + poetry config repositories.remote + poetry --no-interaction -v publish --build --repository remote --username "$" --password "$" + env: + : ${{ secrets. }} + : ${{ secrets. }} diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.gitignore b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.gitignore new file mode 100644 index 00000000000..0da665feeef --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.gitignore @@ -0,0 +1,5 @@ +dist/ +.mypy_cache/ +__pycache__/ +poetry.toml +.ruff_cache/ diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/api.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/api.yml new file mode 100644 index 00000000000..dd65915538f --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/api.yml @@ -0,0 +1,4 @@ +name: exhaustive +auth: bearer +error-discrimination: + strategy: status-code diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/container.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/container.yml new file mode 100644 index 00000000000..165a039dc65 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/container.yml @@ -0,0 +1,48 @@ +imports: + objects: ../types/object.yml + +service: + auth: true + base-path: /container + endpoints: + getAndReturnListOfPrimitives: + path: /list-of-primitives + method: POST + request: list + response: list + + getAndReturnListOfObjects: + path: /list-of-objects + method: POST + request: list + response: list + + getAndReturnSetOfPrimitives: + path: /set-of-primitives + method: POST + request: set + response: set + + getAndReturnSetOfObjects: + path: /set-of-objects + method: POST + request: set + response: set + + getAndReturnMapPrimToPrim: + path: /map-prim-to-prim + method: POST + request: map + response: map + + getAndReturnMapOfPrimToObject: + path: /map-prim-to-object + method: POST + request: map + response: map + + getAndReturnOptional: + path: /opt-objects + method: POST + request: optional + response: optional diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/enum.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/enum.yml new file mode 100644 index 00000000000..335a0889cc7 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/enum.yml @@ -0,0 +1,12 @@ +imports: + enums: ../types/enum.yml + +service: + auth: true + base-path: /enum + endpoints: + getAndReturnEnum: + method: POST + path: "" + request: enums.WeatherReport + response: enums.WeatherReport diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/http-methods.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/http-methods.yml new file mode 100644 index 00000000000..51a54c0802c --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/http-methods.yml @@ -0,0 +1,43 @@ +imports: + objects: ../types/object.yml + +service: + auth: true + base-path: /http-methods + + endpoints: + testGet: + method: GET + path: /{id} + path-parameters: + id: string + response: string + + testPost: + method: POST + path: "" + request: objects.ObjectWithRequiredField + response: objects.ObjectWithOptionalField + + testPut: + method: PUT + path: /{id} + path-parameters: + id: string + request: objects.ObjectWithRequiredField + response: objects.ObjectWithOptionalField + + testPatch: + method: PATCH + path: /{id} + path-parameters: + id: string + request: objects.ObjectWithOptionalField + response: objects.ObjectWithOptionalField + + testDelete: + method: DELETE + path: /{id} + path-parameters: + id: string + response: boolean diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/object.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/object.yml new file mode 100644 index 00000000000..9fad6aa2776 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/object.yml @@ -0,0 +1,44 @@ +imports: + objects: ../types/object.yml + +service: + auth: true + base-path: /object + endpoints: + getAndReturnWithOptionalField: + path: /get-and-return-with-optional-field + method: POST + request: objects.ObjectWithOptionalField + response: objects.ObjectWithOptionalField + + getAndReturnWithRequiredField: + path: /get-and-return-with-required-field + method: POST + request: objects.ObjectWithRequiredField + response: objects.ObjectWithRequiredField + + getAndReturnWithMapOfMap: + path: /get-and-return-with-map-of-map + method: POST + request: objects.ObjectWithMapOfMap + response: objects.ObjectWithMapOfMap + + getAndReturnNestedWithOptionalField: + path: /get-and-return-nested-with-optional-field + method: POST + request: objects.NestedObjectWithOptionalField + response: objects.NestedObjectWithOptionalField + + getAndReturnNestedWithRequiredField: + path: /get-and-return-nested-with-required-field/{string} + method: POST + path-parameters: + string: string + request: objects.NestedObjectWithRequiredField + response: objects.NestedObjectWithRequiredField + + getAndReturnNestedWithRequiredFieldAsList: + path: /get-and-return-nested-with-required-field-list + method: POST + request: list + response: objects.NestedObjectWithRequiredField diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/params.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/params.yml new file mode 100644 index 00000000000..7766547ad79 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/params.yml @@ -0,0 +1,57 @@ +service: + auth: true + base-path: /params + endpoints: + getWithPath: + docs: GET with path param + path: /path/{param} + path-parameters: + param: string + method: GET + response: string + + getWithQuery: + docs: GET with query param + path: "" + method: GET + request: + name: GetWithQuery + query-parameters: + query: string #mandatory for test + number: integer + + getWithAllowMultipleQuery: + docs: GET with multiple of same query param + path: "" + method: GET + request: + name: GetWithMultipleQuery + query-parameters: + query: + type: string + allow-multiple: true + numer: + type: integer + allow-multiple: true + + getWithPathAndQuery: + docs: GET with path and query params + path: /path-query/{param} + path-parameters: + param: string + method: GET + request: + name: GetWithPathAndQuery + query-parameters: + query: string #mandatory for test + + modifyWithPath: + docs: PUT to update with path param + path: /path/{param} + path-parameters: + param: string + method: PUT + request: + name: ModifyResourceAtPath + body: string + response: string diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/primitive.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/primitive.yml new file mode 100644 index 00000000000..8dd7674164c --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/primitive.yml @@ -0,0 +1,60 @@ +imports: + objects: ../types/object.yml + +service: + auth: true + base-path: /primitive + endpoints: + getAndReturnString: + path: /string + method: POST + request: string + response: string + + getAndReturnInt: + path: /integer + method: POST + request: integer + response: integer + + getAndReturnLong: + path: /long + method: POST + request: long + response: long + + getAndReturnDouble: + path: /double + method: POST + request: double + response: double + + getAndReturnBool: + path: /boolean + method: POST + request: boolean + response: boolean + + getAndReturnDatetime: + path: /datetime + method: POST + request: datetime + response: datetime + + getAndReturnDate: + path: /date + method: POST + request: date + response: date + + getAndReturnUUID: + path: /uuid + method: POST + request: uuid + response: uuid + + getAndReturnBase64: + path: /base64 + method: POST + request: base64 + response: base64 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/union.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/union.yml new file mode 100644 index 00000000000..ce9021160d7 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/endpoints/union.yml @@ -0,0 +1,12 @@ +imports: + unions: ../types/union.yml + +service: + auth: true + base-path: /union + endpoints: + getAndReturnUnion: + method: POST + path: "" + request: unions.Animal + response: unions.Animal diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/general-errors.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/general-errors.yml new file mode 100644 index 00000000000..5fbf9cfc417 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/general-errors.yml @@ -0,0 +1,9 @@ +errors: + BadRequestBody: + status-code: 400 + type: BadObjectRequestInfo + +types: + BadObjectRequestInfo: + properties: + message: string diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/inlined-requests.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/inlined-requests.yml new file mode 100644 index 00000000000..9347fe7e335 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/inlined-requests.yml @@ -0,0 +1,25 @@ +imports: + objects: ./types/object.yml + errors: ./general-errors.yml + +# test req bodies, path params, query params, multiple query params, etc. +# test union and enum as well + +service: + auth: false + base-path: /req-bodies + endpoints: + postWithObjectBodyandResponse: + docs: POST with custom object in request body, response is an object + path: /object + method: POST + request: + name: PostWithObjectBody + body: + properties: + string: string + integer: integer + NestedObject: objects.ObjectWithOptionalField + response: objects.ObjectWithOptionalField + errors: + - errors.BadRequestBody diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/no-auth.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/no-auth.yml new file mode 100644 index 00000000000..e3c33ed7fab --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/no-auth.yml @@ -0,0 +1,20 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json + +imports: + general-errors: ./general-errors.yml + +service: + auth: false + base-path: /no-auth + endpoints: + postWithNoAuth: + auth: false + docs: POST request with no auth + path: "" + method: POST + request: + name: PostWithNoAuth + body: unknown + response: boolean + errors: + - general-errors.BadRequestBody diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/no-req-body.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/no-req-body.yml new file mode 100644 index 00000000000..daffd9a495c --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/no-req-body.yml @@ -0,0 +1,16 @@ +imports: + objects: ./types/object.yml + +service: + auth: true + base-path: /no-req-body + endpoints: + getWithNoRequestBody: + path: "" + method: GET + response: objects.ObjectWithOptionalField + + postWithNoRequestBody: + path: "" + method: POST + response: string diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/req-with-headers.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/req-with-headers.yml new file mode 100644 index 00000000000..9e49725782f --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/req-with-headers.yml @@ -0,0 +1,14 @@ +service: + base-path: /test-headers + auth: true + headers: + X-TEST-SERVICE-HEADER: string + endpoints: + getWithCustomHeader: + path: /custom-header + method: POST + request: + name: ReqWithHeaders + headers: + X-TEST-ENDPOINT-HEADER: string + body: string diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/types/enum.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/types/enum.yml new file mode 100644 index 00000000000..a90686092e9 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/types/enum.yml @@ -0,0 +1,12 @@ +types: + WeatherReport: + enum: + - SUNNY + - CLOUDY + - RAINING + - SNOWING + +errors: + ErrorWithEnumBody: + status-code: 400 + type: WeatherReport #does this even make sense? the type of the error body would be enum, and it could only be one of the 4 values? diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/types/object.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/types/object.yml new file mode 100644 index 00000000000..a165ed94cfe --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/types/object.yml @@ -0,0 +1,59 @@ +types: + ObjectWithOptionalField: #generic object that supports any type, makes it easier to use when testing + properties: + string: + type: optional + docs: This is a rather long descriptor of this single field in a more complex type. If you ask me I think this is a pretty good description for this field all things considered. + integer: optional + long: optional + double: optional + bool: optional + datetime: optional + date: optional + uuid: optional + base64: optional + list: optional> + set: optional> + map: optional> + bigint: optional + + ObjectWithRequiredField: + properties: + string: string + + ObjectWithMapOfMap: + properties: + map: map> + + NestedObjectWithOptionalField: + properties: + string: optional + NestedObject: optional + + NestedObjectWithRequiredField: + properties: + string: string + NestedObject: ObjectWithOptionalField + + DoubleOptional: + properties: + optionalAlias: optional + + OptionalAlias: optional + +errors: + ObjectWithOptionalFieldError: + status-code: 400 + type: ObjectWithOptionalField + + ObjectWithRequiredFieldError: + status-code: 400 + type: ObjectWithRequiredField + + NestedObjectWithOptionalFieldError: + status-code: 400 + type: NestedObjectWithOptionalField + + NestedObjectWithRequiredFieldError: + status-code: 400 + type: NestedObjectWithRequiredField diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/types/union.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/types/union.yml new file mode 100644 index 00000000000..99ce8c75ed0 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/definition/types/union.yml @@ -0,0 +1,21 @@ +types: + Animal: + discriminant: animal + union: + dog: Dog + cat: Cat + + Dog: + properties: + name: string + likesToWoof: boolean + + Cat: + properties: + name: string + likesToMeow: boolean + +errors: + ErrorWithUnionBody: + status-code: 400 + type: Animal #has to send either dog or cat object in error body diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/fern.config.json b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/fern.config.json new file mode 100644 index 00000000000..4c8e54ac313 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/fern.config.json @@ -0,0 +1 @@ +{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/generators.yml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/generators.yml new file mode 100644 index 00000000000..0967ef424bc --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/.mock/generators.yml @@ -0,0 +1 @@ +{} diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/README.md b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/README.md new file mode 100644 index 00000000000..1088758f90b --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/README.md @@ -0,0 +1,140 @@ +# Seed Python Library + +[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Seed%2FPython) +[![pypi](https://img.shields.io/pypi/v/fern_exhaustive)](https://pypi.python.org/pypi/fern_exhaustive) + +The Seed Python library provides convenient access to the Seed API from Python. + +## Installation + +```sh +pip install fern_exhaustive +``` + +## Reference + +A full reference for this library is available [here](./reference.md). + +## Usage + +Instantiate and use the client with the following: + +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.container.get_and_return_list_of_primitives( + request=["string", "string"], +) +``` + +## Async Client + +The SDK also exports an `async` client so that you can make non-blocking calls to our API. + +```python +import asyncio + +from seed import AsyncSeedExhaustive + +client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) + + +async def main() -> None: + await client.endpoints.container.get_and_return_list_of_primitives( + request=["string", "string"], + ) + + +asyncio.run(main()) +``` + +## Exception Handling + +When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error +will be thrown. + +```python +from seed.core.api_error import ApiError + +try: + client.endpoints.container.get_and_return_list_of_primitives(...) +except ApiError as e: + print(e.status_code) + print(e.body) +``` + +## Advanced + +### Retries + +The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long +as the request is deemed retriable and the number of retry attempts has not grown larger than the configured +retry limit (default: 2). + +A request is deemed retriable when any of the following HTTP status codes is returned: + +- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) +- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) +- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) + +Use the `max_retries` request option to configure this behavior. + +```python +client.endpoints.container.get_and_return_list_of_primitives(..., request_options={ + "max_retries": 1 +}) +``` + +### Timeouts + +The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level. + +```python + +from seed import SeedExhaustive + +client = SeedExhaustive( + ..., + timeout=20.0, +) + + +# Override timeout for a specific method +client.endpoints.container.get_and_return_list_of_primitives(..., request_options={ + "timeout_in_seconds": 1 +}) +``` + +### Custom Client + +You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies +and transports. +```python +import httpx +from seed import SeedExhaustive + +client = SeedExhaustive( + ..., + httpx_client=httpx.Client( + proxies="http://my.test.proxy.example.com", + transport=httpx.HTTPTransport(local_address="0.0.0.0"), + ), +) +``` + +## Contributing + +While we value open-source contributions to this SDK, this library is generated programmatically. +Additions made directly to this library would have to be moved over to our generation code, +otherwise they would be overwritten upon the next generated release. Feel free to open a PR as +a proof of concept, but know that we will not be able to merge it as-is. We suggest opening +an issue first to discuss with us! + +On the other hand, contributions to the README are always very welcome! diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/pyproject.toml b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/pyproject.toml new file mode 100644 index 00000000000..e38c5c44634 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/pyproject.toml @@ -0,0 +1,61 @@ +[tool.poetry] +name = "fern_exhaustive" +version = "0.0.1" +description = "" +readme = "README.md" +authors = [] +keywords = [] + +classifiers = [ + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Operating System :: OS Independent", + "Operating System :: POSIX", + "Operating System :: MacOS", + "Operating System :: POSIX :: Linux", + "Operating System :: Microsoft :: Windows", + "Topic :: Software Development :: Libraries :: Python Modules", + "Typing :: Typed" +] +packages = [ + { include = "seed", from = "src"} +] + +[project.urls] +Repository = 'https://github.com/exhaustive/fern' + +[tool.poetry.dependencies] +python = "^3.8" +httpx = ">=0.21.2" +pydantic = ">= 2.0.0" +pydantic-core = "^2.18.2" +typing_extensions = ">= 4.0.0" + +[tool.poetry.dev-dependencies] +mypy = "1.0.1" +pytest = "^7.4.0" +pytest-asyncio = "^0.23.5" +python-dateutil = "^2.9.0" +types-python-dateutil = "^2.9.0.20240316" +ruff = "^0.5.6" + +[tool.pytest.ini_options] +testpaths = [ "tests" ] +asyncio_mode = "auto" + +[tool.mypy] +plugins = ["pydantic.mypy"] + +[tool.ruff] +line-length = 120 + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/reference.md b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/reference.md new file mode 100644 index 00000000000..d7004e0c609 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/reference.md @@ -0,0 +1,2829 @@ +# Reference +## Endpoints Container +
client.endpoints.container.get_and_return_list_of_primitives(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.container.get_and_return_list_of_primitives( + request=["string", "string"], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Sequence[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.container.get_and_return_list_of_objects(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive +from seed.types.object import ObjectWithRequiredField + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.container.get_and_return_list_of_objects( + request=[ + ObjectWithRequiredField( + string="string", + ), + ObjectWithRequiredField( + string="string", + ), + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Sequence[ObjectWithRequiredField]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.container.get_and_return_set_of_primitives(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.container.get_and_return_set_of_primitives( + request={"string"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Set[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.container.get_and_return_set_of_objects(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive +from seed.types.object import ObjectWithRequiredField + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.container.get_and_return_set_of_objects( + request=[ + ObjectWithRequiredField( + string="string", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Sequence[ObjectWithRequiredField]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.container.get_and_return_map_prim_to_prim(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.container.get_and_return_map_prim_to_prim( + request={"string": "string"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Dict[str, str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.container.get_and_return_map_of_prim_to_object(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive +from seed.types.object import ObjectWithRequiredField + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.container.get_and_return_map_of_prim_to_object( + request={ + "string": ObjectWithRequiredField( + string="string", + ) + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Dict[str, ObjectWithRequiredField]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.container.get_and_return_optional(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive +from seed.types.object import ObjectWithRequiredField + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.container.get_and_return_optional( + request=ObjectWithRequiredField( + string="string", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Optional[ObjectWithRequiredField]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Endpoints Enum +
client.endpoints.enum.get_and_return_enum(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.enum.get_and_return_enum( + request="SUNNY", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `WeatherReport` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Endpoints HttpMethods +
client.endpoints.http_methods.test_get(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.http_methods.test_get( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.http_methods.test_post(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.http_methods.test_post( + string="string", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**string:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.http_methods.test_put(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.http_methods.test_put( + id="id", + string="string", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**string:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.http_methods.test_patch(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime +import uuid + +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.http_methods.test_patch( + id="id", + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**string:** `typing.Optional[str]` — This is a rather long descriptor of this single field in a more complex type. If you ask me I think this is a pretty good description for this field all things considered. + +
+
+ +
+
+ +**integer:** `typing.Optional[int]` + +
+
+ +
+
+ +**long_:** `typing.Optional[int]` + +
+
+ +
+
+ +**double:** `typing.Optional[float]` + +
+
+ +
+
+ +**bool_:** `typing.Optional[bool]` + +
+
+ +
+
+ +**datetime:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**date:** `typing.Optional[dt.date]` + +
+
+ +
+
+ +**uuid_:** `typing.Optional[uuid.UUID]` + +
+
+ +
+
+ +**base_64:** `typing.Optional[str]` + +
+
+ +
+
+ +**list_:** `typing.Optional[typing.Sequence[str]]` + +
+
+ +
+
+ +**set_:** `typing.Optional[typing.Set[str]]` + +
+
+ +
+
+ +**map_:** `typing.Optional[typing.Dict[int, str]]` + +
+
+ +
+
+ +**bigint:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.http_methods.test_delete(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.http_methods.test_delete( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Endpoints Object +
client.endpoints.object.get_and_return_with_optional_field(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime +import uuid + +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.object.get_and_return_with_optional_field( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**string:** `typing.Optional[str]` — This is a rather long descriptor of this single field in a more complex type. If you ask me I think this is a pretty good description for this field all things considered. + +
+
+ +
+
+ +**integer:** `typing.Optional[int]` + +
+
+ +
+
+ +**long_:** `typing.Optional[int]` + +
+
+ +
+
+ +**double:** `typing.Optional[float]` + +
+
+ +
+
+ +**bool_:** `typing.Optional[bool]` + +
+
+ +
+
+ +**datetime:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**date:** `typing.Optional[dt.date]` + +
+
+ +
+
+ +**uuid_:** `typing.Optional[uuid.UUID]` + +
+
+ +
+
+ +**base_64:** `typing.Optional[str]` + +
+
+ +
+
+ +**list_:** `typing.Optional[typing.Sequence[str]]` + +
+
+ +
+
+ +**set_:** `typing.Optional[typing.Set[str]]` + +
+
+ +
+
+ +**map_:** `typing.Optional[typing.Dict[int, str]]` + +
+
+ +
+
+ +**bigint:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.object.get_and_return_with_required_field(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.object.get_and_return_with_required_field( + string="string", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**string:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.object.get_and_return_with_map_of_map(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.object.get_and_return_with_map_of_map( + map_={"map": {"map": "map"}}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**map_:** `typing.Dict[str, typing.Dict[str, str]]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.object.get_and_return_nested_with_optional_field(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime +import uuid + +from seed import SeedExhaustive +from seed.types.object import ObjectWithOptionalField + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.object.get_and_return_nested_with_optional_field( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**string:** `typing.Optional[str]` + +
+
+ +
+
+ +**nested_object:** `typing.Optional[ObjectWithOptionalField]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.object.get_and_return_nested_with_required_field(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime +import uuid + +from seed import SeedExhaustive +from seed.types.object import ObjectWithOptionalField + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.object.get_and_return_nested_with_required_field( + string_="string", + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**string_:** `str` + +
+
+ +
+
+ +**string:** `str` + +
+
+ +
+
+ +**nested_object:** `ObjectWithOptionalField` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.object.get_and_return_nested_with_required_field_as_list(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime +import uuid + +from seed import SeedExhaustive +from seed.types.object import ( + NestedObjectWithRequiredField, + ObjectWithOptionalField, +) + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.object.get_and_return_nested_with_required_field_as_list( + request=[ + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ), + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ), + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Sequence[NestedObjectWithRequiredField]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Endpoints Params +
client.endpoints.params.get_with_path(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +GET with path param +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.params.get_with_path( + param="param", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**param:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.params.get_with_query(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +GET with query param +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.params.get_with_query( + query="query", + number=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**query:** `str` + +
+
+ +
+
+ +**number:** `int` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.params.get_with_allow_multiple_query(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +GET with multiple of same query param +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.params.get_with_allow_multiple_query( + query="query", + numer=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**query:** `typing.Union[str, typing.Sequence[str]]` + +
+
+ +
+
+ +**numer:** `typing.Union[int, typing.Sequence[int]]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.params.get_with_path_and_query(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +GET with path and query params +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.params.get_with_path_and_query( + param="param", + query="query", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**param:** `str` + +
+
+ +
+
+ +**query:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.params.modify_with_path(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +PUT to update with path param +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.params.modify_with_path( + param="param", + request="string", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**param:** `str` + +
+
+ +
+
+ +**request:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Endpoints Primitive +
client.endpoints.primitive.get_and_return_string(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.primitive.get_and_return_string( + request="string", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.primitive.get_and_return_int(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.primitive.get_and_return_int( + request=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `int` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.primitive.get_and_return_long(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.primitive.get_and_return_long( + request=1000000, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `int` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.primitive.get_and_return_double(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.primitive.get_and_return_double( + request=1.1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `float` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.primitive.get_and_return_bool(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.primitive.get_and_return_bool( + request=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `bool` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.primitive.get_and_return_datetime(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.primitive.get_and_return_datetime( + request=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `dt.datetime` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.primitive.get_and_return_date(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.primitive.get_and_return_date( + request=datetime.date.fromisoformat( + "2023-01-15", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `dt.date` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.primitive.get_and_return_uuid(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import uuid + +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.primitive.get_and_return_uuid( + request=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `uuid.UUID` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.endpoints.primitive.get_and_return_base_64(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.primitive.get_and_return_base_64( + request="SGVsbG8gd29ybGQh", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Endpoints Union +
client.endpoints.union.get_and_return_union(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive +from seed.types.union import Animal_Dog + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.endpoints.union.get_and_return_union( + request=Animal_Dog( + name="name", + likes_to_woof=True, + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Animal` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## InlinedRequests +
client.inlined_requests.post_with_object_bodyand_response(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +POST with custom object in request body, response is an object +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime +import uuid + +from seed import SeedExhaustive +from seed.types.object import ObjectWithOptionalField + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.inlined_requests.post_with_object_bodyand_response( + string="string", + integer=1, + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**string:** `str` + +
+
+ +
+
+ +**integer:** `int` + +
+
+ +
+
+ +**nested_object:** `ObjectWithOptionalField` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## NoAuth +
client.no_auth.post_with_no_auth(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +POST request with no auth +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.no_auth.post_with_no_auth( + request={"key": "value"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Optional[typing.Any]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## NoReqBody +
client.no_req_body.get_with_no_request_body() +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.no_req_body.get_with_no_request_body() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.no_req_body.post_with_no_request_body() +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.no_req_body.post_with_no_request_body() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ReqWithHeaders +
client.req_with_headers.get_with_custom_header(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", +) +client.req_with_headers.get_with_custom_header( + x_test_service_header="X-TEST-SERVICE-HEADER", + x_test_endpoint_header="X-TEST-ENDPOINT-HEADER", + request="string", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**x_test_service_header:** `str` + +
+
+ +
+
+ +**x_test_endpoint_header:** `str` + +
+
+ +
+
+ +**request:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/resolved-snippet-templates.md b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/resolved-snippet-templates.md new file mode 100644 index 00000000000..df18e904d60 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/resolved-snippet-templates.md @@ -0,0 +1,593 @@ +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.container.get_and_return_list_of_primitives( + request=[ + "string", + "string" + ] +) + +``` + + +```python +from seed import SeedExhaustive +from seed.types.object import ObjectWithRequiredField + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.container.get_and_return_list_of_objects( + request=[ + ObjectWithRequiredField( + string="string" + ), + ObjectWithRequiredField( + string="string" + ) + ] +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.container.get_and_return_set_of_primitives( + +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.container.get_and_return_set_of_objects( + +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.container.get_and_return_map_prim_to_prim( + request={ + "string": "string" + } +) + +``` + + +```python +from seed import SeedExhaustive +from seed.types.object import ObjectWithRequiredField + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.container.get_and_return_map_of_prim_to_object( + request={ + "string": ObjectWithRequiredField( + string="string" + ) + } +) + +``` + + +```python +from seed import SeedExhaustive +from seed.types.object import ObjectWithRequiredField + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.container.get_and_return_optional( + request=ObjectWithRequiredField( + string="string" + ) +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +undefined + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.http_methods.test_get( + id="id" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.http_methods.test_post( + string="string" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.http_methods.test_put( + id="id", + string="string" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.http_methods.test_patch( + id="id", + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=true, + datetime="2024-01-15T09:30:00Z", + date="2023-01-15", + uuid_="d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + base_64="SGVsbG8gd29ybGQh", + list_=[ + "list", + "list" + ], + map_={ + "1": "map" + }, + bigint="1000000" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.http_methods.test_delete( + id="id" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.object.get_and_return_with_optional_field( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=true, + datetime="2024-01-15T09:30:00Z", + date="2023-01-15", + uuid_="d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + base_64="SGVsbG8gd29ybGQh", + list_=[ + "list", + "list" + ], + map_={ + "1": "map" + }, + bigint="1000000" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.object.get_and_return_with_required_field( + string="string" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.object.get_and_return_with_map_of_map( + map_={ + "map": { + "map": "map" + } + } +) + +``` + + +```python +from seed import SeedExhaustive +from seed.types.object import ObjectWithOptionalField + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.object.get_and_return_nested_with_optional_field( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=true, + datetime="2024-01-15T09:30:00Z", + date="2023-01-15", + uuid_="d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + base_64="SGVsbG8gd29ybGQh", + list_=[ + "list", + "list" + ], + map_={ + "1": "map" + }, + bigint="1000000" + ) +) + +``` + + +```python +from seed import SeedExhaustive +from seed.types.object import ObjectWithOptionalField + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.object.get_and_return_nested_with_required_field( + string="string", + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=true, + datetime="2024-01-15T09:30:00Z", + date="2023-01-15", + uuid_="d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + base_64="SGVsbG8gd29ybGQh", + list_=[ + "list", + "list" + ], + map_={ + "1": "map" + }, + bigint="1000000" + ) +) + +``` + + +```python +from seed import SeedExhaustive +from seed.types.object import NestedObjectWithRequiredField +from seed.types.object import ObjectWithOptionalField + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.object.get_and_return_nested_with_required_field_as_list( + request=[ + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=true, + datetime="2024-01-15T09:30:00Z", + date="2023-01-15", + uuid_="d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + base_64="SGVsbG8gd29ybGQh", + map_={ + "1": "map" + }, + bigint="1000000" + ) + ), + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=true, + datetime="2024-01-15T09:30:00Z", + date="2023-01-15", + uuid_="d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + base_64="SGVsbG8gd29ybGQh", + map_={ + "1": "map" + }, + bigint="1000000" + ) + ) + ] +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.params.get_with_path( + param="param" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.params.get_with_query( + query="query", + number=1 +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.params.get_with_allow_multiple_query( + query="query", + numer=1 +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.params.get_with_path_and_query( + param="param", + query="query" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.params.modify_with_path( + param="param", + request="string" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.primitive.get_and_return_string( + request="string" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.primitive.get_and_return_int( + request=1 +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.primitive.get_and_return_long( + request=1000000 +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.primitive.get_and_return_double( + request=1.1 +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.primitive.get_and_return_bool( + request=true +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.primitive.get_and_return_datetime( + request="2024-01-15T09:30:00Z" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.primitive.get_and_return_date( + request="2023-01-15" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.primitive.get_and_return_uuid( + request="d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.primitive.get_and_return_base_64( + request="SGVsbG8gd29ybGQh" +) + +``` + + +```python +from seed import SeedExhaustive +from seed.types.union import Animal_Dog + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.endpoints.union.get_and_return_union( + request=request=Animal_Dog(name="name", likes_to_woof=true, ) +) + +``` + + +```python +from seed import SeedExhaustive +from seed.types.object import ObjectWithOptionalField + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.inlined_requests.post_with_object_bodyand_response( + string="string", + integer=1, + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=true, + datetime="2024-01-15T09:30:00Z", + date="2023-01-15", + uuid_="d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + base_64="SGVsbG8gd29ybGQh", + list_=[ + "list", + "list" + ], + map_={ + "1": "map" + }, + bigint="1000000" + ) +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.no_auth.post_with_no_auth( + request={"key":"value"} +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.no_req_body.get_with_no_request_body( + +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.no_req_body.post_with_no_request_body( + +) + +``` + + +```python +from seed import SeedExhaustive + +client = SeedExhaustive(base_url="https://yourhost.com/path/to/api", token="YOUR_TOKEN", ) +client.req_with_headers.get_with_custom_header( + x_test_endpoint_header="X-TEST-ENDPOINT-HEADER", + request="string" +) + +``` + + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/snippet-templates.json b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/snippet-templates.json new file mode 100644 index 00000000000..65dfae3aba5 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/snippet-templates.json @@ -0,0 +1,8324 @@ +[ + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/container/list-of-primitives", + "method": "POST", + "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfPrimitives" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.container.get_and_return_list_of_primitives(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "request=[\n\t\t$FERN_INPUT\n\t]", + "delimiter": ",\n\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "iterable" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.container.get_and_return_list_of_primitives(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "request=[\n\t\t$FERN_INPUT\n\t]", + "delimiter": ",\n\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "iterable" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/container/list-of-objects", + "method": "POST", + "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfObjects" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.container.get_and_return_list_of_objects(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "request=[\n\t\t$FERN_INPUT\n\t]", + "delimiter": ",\n\t\t", + "innerTemplate": { + "imports": [ + "from seed.types.object import ObjectWithRequiredField" + ], + "isOptional": true, + "templateString": "ObjectWithRequiredField(\n\t\t\t$FERN_INPUT\n\t\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t\t", + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "iterable" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.container.get_and_return_list_of_objects(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "request=[\n\t\t$FERN_INPUT\n\t]", + "delimiter": ",\n\t\t", + "innerTemplate": { + "imports": [ + "from seed.types.object import ObjectWithRequiredField" + ], + "isOptional": true, + "templateString": "ObjectWithRequiredField(\n\t\t\t$FERN_INPUT\n\t\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t\t", + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "iterable" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/container/set-of-primitives", + "method": "POST", + "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfPrimitives" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.container.get_and_return_set_of_primitives(\n\t$FERN_INPUT\n)", + "templateInputs": [], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.container.get_and_return_set_of_primitives(\n\t$FERN_INPUT\n)", + "templateInputs": [], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/container/set-of-objects", + "method": "POST", + "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfObjects" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.container.get_and_return_set_of_objects(\n\t$FERN_INPUT\n)", + "templateInputs": [], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.container.get_and_return_set_of_objects(\n\t$FERN_INPUT\n)", + "templateInputs": [], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/container/map-prim-to-prim", + "method": "POST", + "identifierOverride": "endpoint_endpoints/container.getAndReturnMapPrimToPrim" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.container.get_and_return_map_prim_to_prim(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "request={\n\t\t$FERN_INPUT\n\t}", + "delimiter": ",\n\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "dict" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.container.get_and_return_map_prim_to_prim(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "request={\n\t\t$FERN_INPUT\n\t}", + "delimiter": ",\n\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "dict" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/container/map-prim-to-object", + "method": "POST", + "identifierOverride": "endpoint_endpoints/container.getAndReturnMapOfPrimToObject" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.container.get_and_return_map_of_prim_to_object(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "request={\n\t\t$FERN_INPUT\n\t}", + "delimiter": ",\n\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [ + "from seed.types.object import ObjectWithRequiredField" + ], + "isOptional": true, + "templateString": "ObjectWithRequiredField(\n\t\t\t$FERN_INPUT\n\t\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t\t", + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "dict" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.container.get_and_return_map_of_prim_to_object(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "request={\n\t\t$FERN_INPUT\n\t}", + "delimiter": ",\n\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [ + "from seed.types.object import ObjectWithRequiredField" + ], + "isOptional": true, + "templateString": "ObjectWithRequiredField(\n\t\t\t$FERN_INPUT\n\t\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t\t", + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "dict" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/container/opt-objects", + "method": "POST", + "identifierOverride": "endpoint_endpoints/container.getAndReturnOptional" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.container.get_and_return_optional(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [ + "from seed.types.object import ObjectWithRequiredField" + ], + "isOptional": true, + "templateString": "request=ObjectWithRequiredField(\n\t\t$FERN_INPUT\n\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t", + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.container.get_and_return_optional(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [ + "from seed.types.object import ObjectWithRequiredField" + ], + "isOptional": true, + "templateString": "request=ObjectWithRequiredField(\n\t\t$FERN_INPUT\n\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t", + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/enum", + "method": "POST", + "identifierOverride": "endpoint_endpoints/enum.getAndReturnEnum" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.enum.get_and_return_enum(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "values": { + "SUNNY": "\"SUNNY\"", + "CLOUDY": "\"CLOUDY\"", + "RAINING": "\"RAINING\"", + "SNOWING": "\"SNOWING\"" + }, + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "enum" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.enum.get_and_return_enum(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "values": { + "SUNNY": "\"SUNNY\"", + "CLOUDY": "\"CLOUDY\"", + "RAINING": "\"RAINING\"", + "SNOWING": "\"SNOWING\"" + }, + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "enum" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/http-methods/{id}", + "method": "GET", + "identifierOverride": "endpoint_endpoints/http-methods.testGet" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.http_methods.test_get(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "id=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "id", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.http_methods.test_get(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "id=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "id", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/http-methods", + "method": "POST", + "identifierOverride": "endpoint_endpoints/http-methods.testPost" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.http_methods.test_post(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.http_methods.test_post(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/http-methods/{id}", + "method": "PUT", + "identifierOverride": "endpoint_endpoints/http-methods.testPut" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.http_methods.test_put(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "id=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "id", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.http_methods.test_put(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "id=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "id", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/http-methods/{id}", + "method": "PATCH", + "identifierOverride": "endpoint_endpoints/http-methods.testPatch" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.http_methods.test_patch(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "id=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "id", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t$FERN_INPUT\n\t]", + "delimiter": ",\n\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": "list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t$FERN_INPUT\n\t}", + "delimiter": ",\n\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.http_methods.test_patch(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "id=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "id", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t$FERN_INPUT\n\t]", + "delimiter": ",\n\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": "list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t$FERN_INPUT\n\t}", + "delimiter": ",\n\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/http-methods/{id}", + "method": "DELETE", + "identifierOverride": "endpoint_endpoints/http-methods.testDelete" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.http_methods.test_delete(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "id=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "id", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.http_methods.test_delete(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "id=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "id", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/object/get-and-return-with-optional-field", + "method": "POST", + "identifierOverride": "endpoint_endpoints/object.getAndReturnWithOptionalField" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.object.get_and_return_with_optional_field(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t$FERN_INPUT\n\t]", + "delimiter": ",\n\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": "list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t$FERN_INPUT\n\t}", + "delimiter": ",\n\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.object.get_and_return_with_optional_field(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t$FERN_INPUT\n\t]", + "delimiter": ",\n\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": "list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t$FERN_INPUT\n\t}", + "delimiter": ",\n\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/object/get-and-return-with-required-field", + "method": "POST", + "identifierOverride": "endpoint_endpoints/object.getAndReturnWithRequiredField" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.object.get_and_return_with_required_field(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.object.get_and_return_with_required_field(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/object/get-and-return-with-map-of-map", + "method": "POST", + "identifierOverride": "endpoint_endpoints/object.getAndReturnWithMapOfMap" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.object.get_and_return_with_map_of_map(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t$FERN_INPUT\n\t}", + "delimiter": ",\n\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "containerTemplateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", + "delimiter": ",\n\t\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "RELATIVE", + "path": null + }, + "type": "dict" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "map" + }, + "type": "dict" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.object.get_and_return_with_map_of_map(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t$FERN_INPUT\n\t}", + "delimiter": ",\n\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "containerTemplateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", + "delimiter": ",\n\t\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "RELATIVE", + "path": null + }, + "type": "dict" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "map" + }, + "type": "dict" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/object/get-and-return-nested-with-optional-field", + "method": "POST", + "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithOptionalField" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.object.get_and_return_nested_with_optional_field(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [ + "from seed.types.object import ObjectWithOptionalField" + ], + "isOptional": true, + "templateString": "nested_object=ObjectWithOptionalField(\n\t\t$FERN_INPUT\n\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": "NestedObject.list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t\t$FERN_INPUT\n\t\t}", + "delimiter": ",\n\t\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "NestedObject.map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t", + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.object.get_and_return_nested_with_optional_field(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [ + "from seed.types.object import ObjectWithOptionalField" + ], + "isOptional": true, + "templateString": "nested_object=ObjectWithOptionalField(\n\t\t$FERN_INPUT\n\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": "NestedObject.list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t\t$FERN_INPUT\n\t\t}", + "delimiter": ",\n\t\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "NestedObject.map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t", + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/object/get-and-return-nested-with-required-field/{string}", + "method": "POST", + "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredField" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.object.get_and_return_nested_with_required_field(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [ + "from seed.types.object import ObjectWithOptionalField" + ], + "isOptional": true, + "templateString": "nested_object=ObjectWithOptionalField(\n\t\t$FERN_INPUT\n\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": "NestedObject.list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t\t$FERN_INPUT\n\t\t}", + "delimiter": ",\n\t\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "NestedObject.map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t", + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.object.get_and_return_nested_with_required_field(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [ + "from seed.types.object import ObjectWithOptionalField" + ], + "isOptional": true, + "templateString": "nested_object=ObjectWithOptionalField(\n\t\t$FERN_INPUT\n\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": "NestedObject.list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t\t$FERN_INPUT\n\t\t}", + "delimiter": ",\n\t\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "NestedObject.map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t", + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/object/get-and-return-nested-with-required-field-list", + "method": "POST", + "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredFieldAsList" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.object.get_and_return_nested_with_required_field_as_list(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "request=[\n\t\t$FERN_INPUT\n\t]", + "delimiter": ",\n\t\t", + "innerTemplate": { + "imports": [ + "from seed.types.object import NestedObjectWithRequiredField" + ], + "isOptional": true, + "templateString": "NestedObjectWithRequiredField(\n\t\t\t$FERN_INPUT\n\t\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [ + "from seed.types.object import ObjectWithOptionalField" + ], + "isOptional": true, + "templateString": "nested_object=ObjectWithOptionalField(\n\t\t\t\t$FERN_INPUT\n\t\t\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t]", + "delimiter": ",\n\t\t\t\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "RELATIVE", + "path": "NestedObject.list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "delimiter": ",\n\t\t\t\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "RELATIVE", + "path": "NestedObject.map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t\t\t", + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t\t", + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "iterable" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.object.get_and_return_nested_with_required_field_as_list(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "request=[\n\t\t$FERN_INPUT\n\t]", + "delimiter": ",\n\t\t", + "innerTemplate": { + "imports": [ + "from seed.types.object import NestedObjectWithRequiredField" + ], + "isOptional": true, + "templateString": "NestedObjectWithRequiredField(\n\t\t\t$FERN_INPUT\n\t\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [ + "from seed.types.object import ObjectWithOptionalField" + ], + "isOptional": true, + "templateString": "nested_object=ObjectWithOptionalField(\n\t\t\t\t$FERN_INPUT\n\t\t\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t]", + "delimiter": ",\n\t\t\t\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "RELATIVE", + "path": "NestedObject.list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "delimiter": ",\n\t\t\t\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "RELATIVE", + "path": "NestedObject.map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": "NestedObject.bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t\t\t", + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t\t", + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": null + }, + "type": "iterable" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/params/path/{param}", + "method": "GET", + "identifierOverride": "endpoint_endpoints/params.getWithPath" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.params.get_with_path(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "param=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "param", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.params.get_with_path(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "param=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "param", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/params", + "method": "GET", + "identifierOverride": "endpoint_endpoints/params.getWithQuery" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.params.get_with_query(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "query=$FERN_INPUT", + "templateInputs": [ + { + "location": "QUERY", + "path": "query", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "number=$FERN_INPUT", + "templateInputs": [ + { + "location": "QUERY", + "path": "number", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.params.get_with_query(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "query=$FERN_INPUT", + "templateInputs": [ + { + "location": "QUERY", + "path": "query", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "number=$FERN_INPUT", + "templateInputs": [ + { + "location": "QUERY", + "path": "number", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/params", + "method": "GET", + "identifierOverride": "endpoint_endpoints/params.getWithAllowMultipleQuery" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.params.get_with_allow_multiple_query(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "query=$FERN_INPUT", + "templateInputs": [ + { + "location": "QUERY", + "path": "query", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "numer=$FERN_INPUT", + "templateInputs": [ + { + "location": "QUERY", + "path": "numer", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.params.get_with_allow_multiple_query(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "query=$FERN_INPUT", + "templateInputs": [ + { + "location": "QUERY", + "path": "query", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "numer=$FERN_INPUT", + "templateInputs": [ + { + "location": "QUERY", + "path": "numer", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/params/path-query/{param}", + "method": "GET", + "identifierOverride": "endpoint_endpoints/params.getWithPathAndQuery" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.params.get_with_path_and_query(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "param=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "param", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "query=$FERN_INPUT", + "templateInputs": [ + { + "location": "QUERY", + "path": "query", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.params.get_with_path_and_query(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "param=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "param", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "query=$FERN_INPUT", + "templateInputs": [ + { + "location": "QUERY", + "path": "query", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/params/path/{param}", + "method": "PUT", + "identifierOverride": "endpoint_endpoints/params.modifyWithPath" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.params.modify_with_path(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "param=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "param", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.params.modify_with_path(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "param=$FERN_INPUT", + "templateInputs": [ + { + "location": "PATH", + "path": "param", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/primitive/string", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnString" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.primitive.get_and_return_string(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.primitive.get_and_return_string(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/primitive/integer", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnInt" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.primitive.get_and_return_int(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.primitive.get_and_return_int(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/primitive/long", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnLong" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.primitive.get_and_return_long(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.primitive.get_and_return_long(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/primitive/double", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDouble" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.primitive.get_and_return_double(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.primitive.get_and_return_double(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/primitive/boolean", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBool" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.primitive.get_and_return_bool(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.primitive.get_and_return_bool(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/primitive/datetime", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDatetime" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.primitive.get_and_return_datetime(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.primitive.get_and_return_datetime(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/primitive/date", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDate" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.primitive.get_and_return_date(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.primitive.get_and_return_date(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/primitive/uuid", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.primitive.get_and_return_uuid(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.primitive.get_and_return_uuid(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/primitive/base64", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.primitive.get_and_return_base_64(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.primitive.get_and_return_base_64(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/union", + "method": "POST", + "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.endpoints.union.get_and_return_union(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "discriminantField": "animal", + "members": { + "dog": { + "imports": [ + "from seed.types.union import Animal_Dog" + ], + "isOptional": true, + "templateString": "request=Animal_Dog($FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "name=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "name", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "likes_to_woof=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "likesToWoof", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "type": "generic" + }, + "cat": { + "imports": [ + "from seed.types.union import Animal_Cat" + ], + "isOptional": true, + "templateString": "request=Animal_Cat($FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "name=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "name", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "likes_to_meow=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "likesToMeow", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "type": "generic" + } + }, + "templateInput": { + "location": "RELATIVE" + }, + "type": "discriminatedUnion" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.endpoints.union.get_and_return_union(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "discriminantField": "animal", + "members": { + "dog": { + "imports": [ + "from seed.types.union import Animal_Dog" + ], + "isOptional": true, + "templateString": "request=Animal_Dog($FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "name=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "name", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "likes_to_woof=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "likesToWoof", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "type": "generic" + }, + "cat": { + "imports": [ + "from seed.types.union import Animal_Cat" + ], + "isOptional": true, + "templateString": "request=Animal_Cat($FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "name=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "name", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "likes_to_meow=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "likesToMeow", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "type": "generic" + } + }, + "templateInput": { + "location": "RELATIVE" + }, + "type": "discriminatedUnion" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/req-bodies/object", + "method": "POST", + "identifierOverride": "endpoint_inlined-requests.postWithObjectBodyandResponse" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.inlined_requests.post_with_object_bodyand_response(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [ + "from seed.types.object import ObjectWithOptionalField" + ], + "isOptional": true, + "templateString": "nested_object=ObjectWithOptionalField(\n\t\t$FERN_INPUT\n\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": "NestedObject.list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t\t$FERN_INPUT\n\t\t}", + "delimiter": ",\n\t\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "NestedObject.map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t", + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.inlined_requests.post_with_object_bodyand_response(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [ + "from seed.types.object import ObjectWithOptionalField" + ], + "isOptional": true, + "templateString": "nested_object=ObjectWithOptionalField(\n\t\t$FERN_INPUT\n\t)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "string=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.string", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "integer=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.integer", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "long_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.long", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "double=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.double", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bool_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bool", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "datetime=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.datetime", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "date=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.date", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "uuid_=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.uuid", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "base_64=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.base64", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "list_=[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "BODY", + "path": "NestedObject.list" + }, + "type": "iterable" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "map_={\n\t\t\t$FERN_INPUT\n\t\t}", + "delimiter": ",\n\t\t\t", + "keyTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "templateInputs": [ + { + "location": "RELATIVE", + "path": null, + "type": "payload" + } + ], + "type": "generic" + }, + "keyValueSeparator": ": ", + "templateInput": { + "location": "BODY", + "path": "NestedObject.map" + }, + "type": "dict" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "bigint=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": "NestedObject.bigint", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t\t", + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/no-auth", + "method": "POST", + "identifierOverride": "endpoint_no-auth.postWithNoAuth" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.no_auth.post_with_no_auth(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.no_auth.post_with_no_auth(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/no-req-body", + "method": "GET", + "identifierOverride": "endpoint_no-req-body.getWithNoRequestBody" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.no_req_body.get_with_no_request_body(\n\t$FERN_INPUT\n)", + "templateInputs": [], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.no_req_body.get_with_no_request_body(\n\t$FERN_INPUT\n)", + "templateInputs": [], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/no-req-body", + "method": "POST", + "identifierOverride": "endpoint_no-req-body.postWithNoRequestBody" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.no_req_body.post_with_no_request_body(\n\t$FERN_INPUT\n)", + "templateInputs": [], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.no_req_body.post_with_no_request_body(\n\t$FERN_INPUT\n)", + "templateInputs": [], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + }, + { + "sdk": { + "package": "fern_exhaustive", + "version": "0.0.1", + "type": "python" + }, + "endpointId": { + "path": "/test-headers/custom-header", + "method": "POST", + "identifierOverride": "endpoint_req-with-headers.getWithCustomHeader" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "from seed import SeedExhaustive" + ], + "isOptional": true, + "templateString": "client = SeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "client.req_with_headers.get_with_custom_header(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "x_test_endpoint_header=$FERN_INPUT", + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-TEST-ENDPOINT-HEADER", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + }, + "additionalTemplates": { + "async": { + "clientInstantiation": { + "imports": [ + "from seed import AsyncSeedExhaustive" + ], + "isOptional": true, + "templateString": "client = AsyncSeedExhaustive(base_url=\"https://yourhost.com/path/to/api\", $FERN_INPUT, )", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": false, + "templateString": "token=$FERN_INPUT", + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",", + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "isOptional": true, + "templateString": "await client.req_with_headers.get_with_custom_header(\n\t$FERN_INPUT\n)", + "templateInputs": [ + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "x_test_endpoint_header=$FERN_INPUT", + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-TEST-ENDPOINT-HEADER", + "type": "payload" + } + ], + "type": "generic" + } + }, + { + "type": "template", + "value": { + "imports": [], + "isOptional": true, + "templateString": "request=$FERN_INPUT", + "templateInputs": [ + { + "location": "BODY", + "path": null, + "type": "payload" + } + ], + "type": "generic" + } + } + ], + "inputDelimiter": ",\n\t", + "type": "generic" + }, + "type": "v1" + } + } + } +] \ No newline at end of file diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/snippet.json b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/snippet.json new file mode 100644 index 00000000000..62ecc67b879 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/snippet.json @@ -0,0 +1,512 @@ +{ + "types": {}, + "endpoints": [ + { + "example_identifier": "default", + "id": { + "path": "/container/list-of-primitives", + "method": "POST", + "identifier_override": "endpoint_endpoints/container.getAndReturnListOfPrimitives" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.container.get_and_return_list_of_primitives(\n request=[\"string\", \"string\"],\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.container.get_and_return_list_of_primitives(\n request=[\"string\", \"string\"],\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/container/list-of-objects", + "method": "POST", + "identifier_override": "endpoint_endpoints/container.getAndReturnListOfObjects" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\nfrom seed.types.object import ObjectWithRequiredField\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.container.get_and_return_list_of_objects(\n request=[\n ObjectWithRequiredField(\n string=\"string\",\n ),\n ObjectWithRequiredField(\n string=\"string\",\n ),\n ],\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\nfrom seed.types.object import ObjectWithRequiredField\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.container.get_and_return_list_of_objects(\n request=[\n ObjectWithRequiredField(\n string=\"string\",\n ),\n ObjectWithRequiredField(\n string=\"string\",\n ),\n ],\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/container/set-of-primitives", + "method": "POST", + "identifier_override": "endpoint_endpoints/container.getAndReturnSetOfPrimitives" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.container.get_and_return_set_of_primitives(\n request={\"string\"},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.container.get_and_return_set_of_primitives(\n request={\"string\"},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/container/set-of-objects", + "method": "POST", + "identifier_override": "endpoint_endpoints/container.getAndReturnSetOfObjects" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\nfrom seed.types.object import ObjectWithRequiredField\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.container.get_and_return_set_of_objects(\n request=[\n ObjectWithRequiredField(\n string=\"string\",\n )\n ],\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\nfrom seed.types.object import ObjectWithRequiredField\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.container.get_and_return_set_of_objects(\n request=[\n ObjectWithRequiredField(\n string=\"string\",\n )\n ],\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/container/map-prim-to-prim", + "method": "POST", + "identifier_override": "endpoint_endpoints/container.getAndReturnMapPrimToPrim" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.container.get_and_return_map_prim_to_prim(\n request={\"string\": \"string\"},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.container.get_and_return_map_prim_to_prim(\n request={\"string\": \"string\"},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/container/map-prim-to-object", + "method": "POST", + "identifier_override": "endpoint_endpoints/container.getAndReturnMapOfPrimToObject" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\nfrom seed.types.object import ObjectWithRequiredField\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.container.get_and_return_map_of_prim_to_object(\n request={\n \"string\": ObjectWithRequiredField(\n string=\"string\",\n )\n },\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\nfrom seed.types.object import ObjectWithRequiredField\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.container.get_and_return_map_of_prim_to_object(\n request={\n \"string\": ObjectWithRequiredField(\n string=\"string\",\n )\n },\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/container/opt-objects", + "method": "POST", + "identifier_override": "endpoint_endpoints/container.getAndReturnOptional" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\nfrom seed.types.object import ObjectWithRequiredField\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.container.get_and_return_optional(\n request=ObjectWithRequiredField(\n string=\"string\",\n ),\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\nfrom seed.types.object import ObjectWithRequiredField\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.container.get_and_return_optional(\n request=ObjectWithRequiredField(\n string=\"string\",\n ),\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/enum", + "method": "POST", + "identifier_override": "endpoint_endpoints/enum.getAndReturnEnum" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.enum.get_and_return_enum(\n request=\"SUNNY\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.enum.get_and_return_enum(\n request=\"SUNNY\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/http-methods/{id}", + "method": "GET", + "identifier_override": "endpoint_endpoints/http-methods.testGet" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.http_methods.test_get(\n id=\"id\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.http_methods.test_get(\n id=\"id\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/http-methods", + "method": "POST", + "identifier_override": "endpoint_endpoints/http-methods.testPost" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.http_methods.test_post(\n string=\"string\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.http_methods.test_post(\n string=\"string\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/http-methods/{id}", + "method": "PUT", + "identifier_override": "endpoint_endpoints/http-methods.testPut" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.http_methods.test_put(\n id=\"id\",\n string=\"string\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.http_methods.test_put(\n id=\"id\",\n string=\"string\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/http-methods/{id}", + "method": "PATCH", + "identifier_override": "endpoint_endpoints/http-methods.testPatch" + }, + "snippet": { + "sync_client": "import datetime\nimport uuid\n\nfrom seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.http_methods.test_patch(\n id=\"id\",\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n)\n", + "async_client": "import asyncio\nimport datetime\nimport uuid\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.http_methods.test_patch(\n id=\"id\",\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/http-methods/{id}", + "method": "DELETE", + "identifier_override": "endpoint_endpoints/http-methods.testDelete" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.http_methods.test_delete(\n id=\"id\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.http_methods.test_delete(\n id=\"id\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-with-optional-field", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnWithOptionalField" + }, + "snippet": { + "sync_client": "import datetime\nimport uuid\n\nfrom seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_with_optional_field(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n)\n", + "async_client": "import asyncio\nimport datetime\nimport uuid\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_with_optional_field(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-with-required-field", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnWithRequiredField" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_with_required_field(\n string=\"string\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_with_required_field(\n string=\"string\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-with-map-of-map", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnWithMapOfMap" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_with_map_of_map(\n map_={\"map\": {\"map\": \"map\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_with_map_of_map(\n map_={\"map\": {\"map\": \"map\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-nested-with-optional-field", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnNestedWithOptionalField" + }, + "snippet": { + "sync_client": "import datetime\nimport uuid\n\nfrom seed import SeedExhaustive\nfrom seed.types.object import ObjectWithOptionalField\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_nested_with_optional_field(\n string=\"string\",\n nested_object=ObjectWithOptionalField(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n ),\n)\n", + "async_client": "import asyncio\nimport datetime\nimport uuid\n\nfrom seed import AsyncSeedExhaustive\nfrom seed.types.object import ObjectWithOptionalField\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_nested_with_optional_field(\n string=\"string\",\n nested_object=ObjectWithOptionalField(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n ),\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-nested-with-required-field/{string}", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnNestedWithRequiredField" + }, + "snippet": { + "sync_client": "import datetime\nimport uuid\n\nfrom seed import SeedExhaustive\nfrom seed.types.object import ObjectWithOptionalField\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_nested_with_required_field(\n string_=\"string\",\n string=\"string\",\n nested_object=ObjectWithOptionalField(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n ),\n)\n", + "async_client": "import asyncio\nimport datetime\nimport uuid\n\nfrom seed import AsyncSeedExhaustive\nfrom seed.types.object import ObjectWithOptionalField\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_nested_with_required_field(\n string_=\"string\",\n string=\"string\",\n nested_object=ObjectWithOptionalField(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n ),\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-nested-with-required-field-list", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnNestedWithRequiredFieldAsList" + }, + "snippet": { + "sync_client": "import datetime\nimport uuid\n\nfrom seed import SeedExhaustive\nfrom seed.types.object import (\n NestedObjectWithRequiredField,\n ObjectWithOptionalField,\n)\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_nested_with_required_field_as_list(\n request=[\n NestedObjectWithRequiredField(\n string=\"string\",\n nested_object=ObjectWithOptionalField(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n ),\n ),\n NestedObjectWithRequiredField(\n string=\"string\",\n nested_object=ObjectWithOptionalField(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n ),\n ),\n ],\n)\n", + "async_client": "import asyncio\nimport datetime\nimport uuid\n\nfrom seed import AsyncSeedExhaustive\nfrom seed.types.object import (\n NestedObjectWithRequiredField,\n ObjectWithOptionalField,\n)\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_nested_with_required_field_as_list(\n request=[\n NestedObjectWithRequiredField(\n string=\"string\",\n nested_object=ObjectWithOptionalField(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n ),\n ),\n NestedObjectWithRequiredField(\n string=\"string\",\n nested_object=ObjectWithOptionalField(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n ),\n ),\n ],\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/params/path/{param}", + "method": "GET", + "identifier_override": "endpoint_endpoints/params.getWithPath" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.params.get_with_path(\n param=\"param\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.params.get_with_path(\n param=\"param\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/params", + "method": "GET", + "identifier_override": "endpoint_endpoints/params.getWithQuery" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.params.get_with_query(\n query=\"query\",\n number=1,\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.params.get_with_query(\n query=\"query\",\n number=1,\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/params", + "method": "GET", + "identifier_override": "endpoint_endpoints/params.getWithAllowMultipleQuery" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.params.get_with_allow_multiple_query(\n query=\"query\",\n numer=1,\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.params.get_with_allow_multiple_query(\n query=\"query\",\n numer=1,\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/params/path-query/{param}", + "method": "GET", + "identifier_override": "endpoint_endpoints/params.getWithPathAndQuery" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.params.get_with_path_and_query(\n param=\"param\",\n query=\"query\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.params.get_with_path_and_query(\n param=\"param\",\n query=\"query\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/params/path/{param}", + "method": "PUT", + "identifier_override": "endpoint_endpoints/params.modifyWithPath" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.params.modify_with_path(\n param=\"param\",\n request=\"string\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.params.modify_with_path(\n param=\"param\",\n request=\"string\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/primitive/string", + "method": "POST", + "identifier_override": "endpoint_endpoints/primitive.getAndReturnString" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.primitive.get_and_return_string(\n request=\"string\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.primitive.get_and_return_string(\n request=\"string\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/primitive/integer", + "method": "POST", + "identifier_override": "endpoint_endpoints/primitive.getAndReturnInt" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.primitive.get_and_return_int(\n request=1,\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.primitive.get_and_return_int(\n request=1,\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/primitive/long", + "method": "POST", + "identifier_override": "endpoint_endpoints/primitive.getAndReturnLong" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.primitive.get_and_return_long(\n request=1000000,\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.primitive.get_and_return_long(\n request=1000000,\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/primitive/double", + "method": "POST", + "identifier_override": "endpoint_endpoints/primitive.getAndReturnDouble" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.primitive.get_and_return_double(\n request=1.1,\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.primitive.get_and_return_double(\n request=1.1,\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/primitive/boolean", + "method": "POST", + "identifier_override": "endpoint_endpoints/primitive.getAndReturnBool" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.primitive.get_and_return_bool(\n request=True,\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.primitive.get_and_return_bool(\n request=True,\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/primitive/datetime", + "method": "POST", + "identifier_override": "endpoint_endpoints/primitive.getAndReturnDatetime" + }, + "snippet": { + "sync_client": "import datetime\n\nfrom seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.primitive.get_and_return_datetime(\n request=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n)\n", + "async_client": "import asyncio\nimport datetime\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.primitive.get_and_return_datetime(\n request=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/primitive/date", + "method": "POST", + "identifier_override": "endpoint_endpoints/primitive.getAndReturnDate" + }, + "snippet": { + "sync_client": "import datetime\n\nfrom seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.primitive.get_and_return_date(\n request=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n)\n", + "async_client": "import asyncio\nimport datetime\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.primitive.get_and_return_date(\n request=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/primitive/uuid", + "method": "POST", + "identifier_override": "endpoint_endpoints/primitive.getAndReturnUUID" + }, + "snippet": { + "sync_client": "import uuid\n\nfrom seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.primitive.get_and_return_uuid(\n request=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n)\n", + "async_client": "import asyncio\nimport uuid\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.primitive.get_and_return_uuid(\n request=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/primitive/base64", + "method": "POST", + "identifier_override": "endpoint_endpoints/primitive.getAndReturnBase64" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.primitive.get_and_return_base_64(\n request=\"SGVsbG8gd29ybGQh\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.primitive.get_and_return_base_64(\n request=\"SGVsbG8gd29ybGQh\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/union", + "method": "POST", + "identifier_override": "endpoint_endpoints/union.getAndReturnUnion" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\nfrom seed.types.union import Animal_Dog\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.union.get_and_return_union(\n request=Animal_Dog(\n name=\"name\",\n likes_to_woof=True,\n ),\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\nfrom seed.types.union import Animal_Dog\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.union.get_and_return_union(\n request=Animal_Dog(\n name=\"name\",\n likes_to_woof=True,\n ),\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/req-bodies/object", + "method": "POST", + "identifier_override": "endpoint_inlined-requests.postWithObjectBodyandResponse" + }, + "snippet": { + "sync_client": "import datetime\nimport uuid\n\nfrom seed import SeedExhaustive\nfrom seed.types.object import ObjectWithOptionalField\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.inlined_requests.post_with_object_bodyand_response(\n string=\"string\",\n integer=1,\n nested_object=ObjectWithOptionalField(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n ),\n)\n", + "async_client": "import asyncio\nimport datetime\nimport uuid\n\nfrom seed import AsyncSeedExhaustive\nfrom seed.types.object import ObjectWithOptionalField\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.inlined_requests.post_with_object_bodyand_response(\n string=\"string\",\n integer=1,\n nested_object=ObjectWithOptionalField(\n string=\"string\",\n integer=1,\n long_=1000000,\n double=1.1,\n bool_=True,\n datetime=datetime.datetime.fromisoformat(\n \"2024-01-15 09:30:00+00:00\",\n ),\n date=datetime.date.fromisoformat(\n \"2023-01-15\",\n ),\n uuid_=uuid.UUID(\n \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n ),\n base_64=\"SGVsbG8gd29ybGQh\",\n list_=[\"list\", \"list\"],\n set_={\"set\"},\n map_={1: \"map\"},\n bigint=1000000,\n ),\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/no-auth", + "method": "POST", + "identifier_override": "endpoint_no-auth.postWithNoAuth" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.no_auth.post_with_no_auth(\n request={\"key\": \"value\"},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.no_auth.post_with_no_auth(\n request={\"key\": \"value\"},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/no-req-body", + "method": "GET", + "identifier_override": "endpoint_no-req-body.getWithNoRequestBody" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.no_req_body.get_with_no_request_body()\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.no_req_body.get_with_no_request_body()\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/no-req-body", + "method": "POST", + "identifier_override": "endpoint_no-req-body.postWithNoRequestBody" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.no_req_body.post_with_no_request_body()\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.no_req_body.post_with_no_request_body()\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, + { + "example_identifier": "default", + "id": { + "path": "/test-headers/custom-header", + "method": "POST", + "identifier_override": "endpoint_req-with-headers.getWithCustomHeader" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.req_with_headers.get_with_custom_header(\n x_test_service_header=\"X-TEST-SERVICE-HEADER\",\n x_test_endpoint_header=\"X-TEST-ENDPOINT-HEADER\",\n request=\"string\",\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.req_with_headers.get_with_custom_header(\n x_test_service_header=\"X-TEST-SERVICE-HEADER\",\n x_test_endpoint_header=\"X-TEST-ENDPOINT-HEADER\",\n request=\"string\",\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + } + ] +} \ No newline at end of file diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/__init__.py new file mode 100644 index 00000000000..eb56b0ce275 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/__init__.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from . import endpoints, general_errors, inlined_requests, no_auth, no_req_body, req_with_headers, types +from .client import AsyncSeedExhaustive, SeedExhaustive +from .general_errors import BadObjectRequestInfo, BadRequestBody +from .version import __version__ + +__all__ = [ + "AsyncSeedExhaustive", + "BadObjectRequestInfo", + "BadRequestBody", + "SeedExhaustive", + "__version__", + "endpoints", + "general_errors", + "inlined_requests", + "no_auth", + "no_req_body", + "req_with_headers", + "types", +] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/client.py new file mode 100644 index 00000000000..ab22df2044f --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/client.py @@ -0,0 +1,128 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +import httpx +from .core.client_wrapper import SyncClientWrapper +from .endpoints.client import EndpointsClient +from .inlined_requests.client import InlinedRequestsClient +from .no_auth.client import NoAuthClient +from .no_req_body.client import NoReqBodyClient +from .req_with_headers.client import ReqWithHeadersClient +from .core.client_wrapper import AsyncClientWrapper +from .endpoints.client import AsyncEndpointsClient +from .inlined_requests.client import AsyncInlinedRequestsClient +from .no_auth.client import AsyncNoAuthClient +from .no_req_body.client import AsyncNoReqBodyClient +from .req_with_headers.client import AsyncReqWithHeadersClient + + +class SeedExhaustive: + """ + Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions. + + Parameters + ---------- + base_url : str + The base url to use for requests from the client. + + token : typing.Optional[typing.Union[str, typing.Callable[[], str]]] + timeout : typing.Optional[float] + The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. + + follow_redirects : typing.Optional[bool] + Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in. + + httpx_client : typing.Optional[httpx.Client] + The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + """ + + def __init__( + self, + *, + base_url: str, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + timeout: typing.Optional[float] = None, + follow_redirects: typing.Optional[bool] = True, + httpx_client: typing.Optional[httpx.Client] = None, + ): + _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None + self._client_wrapper = SyncClientWrapper( + base_url=base_url, + token=token, + httpx_client=httpx_client + if httpx_client is not None + else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects) + if follow_redirects is not None + else httpx.Client(timeout=_defaulted_timeout), + timeout=_defaulted_timeout, + ) + self.endpoints = EndpointsClient(client_wrapper=self._client_wrapper) + self.inlined_requests = InlinedRequestsClient(client_wrapper=self._client_wrapper) + self.no_auth = NoAuthClient(client_wrapper=self._client_wrapper) + self.no_req_body = NoReqBodyClient(client_wrapper=self._client_wrapper) + self.req_with_headers = ReqWithHeadersClient(client_wrapper=self._client_wrapper) + + +class AsyncSeedExhaustive: + """ + Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions. + + Parameters + ---------- + base_url : str + The base url to use for requests from the client. + + token : typing.Optional[typing.Union[str, typing.Callable[[], str]]] + timeout : typing.Optional[float] + The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. + + follow_redirects : typing.Optional[bool] + Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in. + + httpx_client : typing.Optional[httpx.AsyncClient] + The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. + + Examples + -------- + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + """ + + def __init__( + self, + *, + base_url: str, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + timeout: typing.Optional[float] = None, + follow_redirects: typing.Optional[bool] = True, + httpx_client: typing.Optional[httpx.AsyncClient] = None, + ): + _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None + self._client_wrapper = AsyncClientWrapper( + base_url=base_url, + token=token, + httpx_client=httpx_client + if httpx_client is not None + else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects) + if follow_redirects is not None + else httpx.AsyncClient(timeout=_defaulted_timeout), + timeout=_defaulted_timeout, + ) + self.endpoints = AsyncEndpointsClient(client_wrapper=self._client_wrapper) + self.inlined_requests = AsyncInlinedRequestsClient(client_wrapper=self._client_wrapper) + self.no_auth = AsyncNoAuthClient(client_wrapper=self._client_wrapper) + self.no_req_body = AsyncNoReqBodyClient(client_wrapper=self._client_wrapper) + self.req_with_headers = AsyncReqWithHeadersClient(client_wrapper=self._client_wrapper) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/__init__.py new file mode 100644 index 00000000000..f03aecbfe18 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/__init__.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from .api_error import ApiError +from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper +from .datetime_utils import serialize_datetime +from .file import File, convert_file_dict_to_httpx_tuples, with_content_type +from .http_client import AsyncHttpClient, HttpClient +from .jsonable_encoder import jsonable_encoder +from .pydantic_utilities import ( + IS_PYDANTIC_V2, + UniversalBaseModel, + UniversalRootModel, + parse_obj_as, + universal_field_validator, + universal_root_validator, + update_forward_refs, +) +from .query_encoder import encode_query +from .remove_none_from_dict import remove_none_from_dict +from .request_options import RequestOptions +from .serialization import FieldMetadata, convert_and_respect_annotation_metadata + +__all__ = [ + "ApiError", + "AsyncClientWrapper", + "AsyncHttpClient", + "BaseClientWrapper", + "FieldMetadata", + "File", + "HttpClient", + "IS_PYDANTIC_V2", + "RequestOptions", + "SyncClientWrapper", + "UniversalBaseModel", + "UniversalRootModel", + "convert_and_respect_annotation_metadata", + "convert_file_dict_to_httpx_tuples", + "encode_query", + "jsonable_encoder", + "parse_obj_as", + "remove_none_from_dict", + "serialize_datetime", + "universal_field_validator", + "universal_root_validator", + "update_forward_refs", + "with_content_type", +] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/api_error.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/api_error.py new file mode 100644 index 00000000000..2e9fc5431cd --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/api_error.py @@ -0,0 +1,15 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + + +class ApiError(Exception): + status_code: typing.Optional[int] + body: typing.Any + + def __init__(self, *, status_code: typing.Optional[int] = None, body: typing.Any = None): + self.status_code = status_code + self.body = body + + def __str__(self) -> str: + return f"status_code: {self.status_code}, body: {self.body}" diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/client_wrapper.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/client_wrapper.py new file mode 100644 index 00000000000..010885d377e --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/client_wrapper.py @@ -0,0 +1,78 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +import httpx +from .http_client import HttpClient +from .http_client import AsyncHttpClient + + +class BaseClientWrapper: + def __init__( + self, + *, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + ): + self._token = token + self._base_url = base_url + self._timeout = timeout + + def get_headers(self) -> typing.Dict[str, str]: + headers: typing.Dict[str, str] = { + "X-Fern-Language": "Python", + "X-Fern-SDK-Name": "fern_exhaustive", + "X-Fern-SDK-Version": "0.0.1", + } + token = self._get_token() + if token is not None: + headers["Authorization"] = f"Bearer {token}" + return headers + + def _get_token(self) -> typing.Optional[str]: + if isinstance(self._token, str) or self._token is None: + return self._token + else: + return self._token() + + def get_base_url(self) -> str: + return self._base_url + + def get_timeout(self) -> typing.Optional[float]: + return self._timeout + + +class SyncClientWrapper(BaseClientWrapper): + def __init__( + self, + *, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + httpx_client: httpx.Client, + ): + super().__init__(token=token, base_url=base_url, timeout=timeout) + self.httpx_client = HttpClient( + httpx_client=httpx_client, + base_headers=self.get_headers, + base_timeout=self.get_timeout, + base_url=self.get_base_url, + ) + + +class AsyncClientWrapper(BaseClientWrapper): + def __init__( + self, + *, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + httpx_client: httpx.AsyncClient, + ): + super().__init__(token=token, base_url=base_url, timeout=timeout) + self.httpx_client = AsyncHttpClient( + httpx_client=httpx_client, + base_headers=self.get_headers, + base_timeout=self.get_timeout, + base_url=self.get_base_url, + ) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/datetime_utils.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/datetime_utils.py new file mode 100644 index 00000000000..7c9864a944c --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/datetime_utils.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt + + +def serialize_datetime(v: dt.datetime) -> str: + """ + Serialize a datetime including timezone info. + + Uses the timezone info provided if present, otherwise uses the current runtime's timezone info. + + UTC datetimes end in "Z" while all other timezones are represented as offset from UTC, e.g. +05:00. + """ + + def _serialize_zoned_datetime(v: dt.datetime) -> str: + if v.tzinfo is not None and v.tzinfo.tzname(None) == dt.timezone.utc.tzname(None): + # UTC is a special case where we use "Z" at the end instead of "+00:00" + return v.isoformat().replace("+00:00", "Z") + else: + # Delegate to the typical +/- offset format + return v.isoformat() + + if v.tzinfo is not None: + return _serialize_zoned_datetime(v) + else: + local_tz = dt.datetime.now().astimezone().tzinfo + localized_dt = v.replace(tzinfo=local_tz) + return _serialize_zoned_datetime(localized_dt) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/file.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/file.py new file mode 100644 index 00000000000..b4cbba30f73 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/file.py @@ -0,0 +1,62 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import IO, Dict, List, Mapping, Optional, Tuple, Union, cast + +# File typing inspired by the flexibility of types within the httpx library +# https://github.com/encode/httpx/blob/master/httpx/_types.py +FileContent = Union[IO[bytes], bytes, str] +File = Union[ + # file (or bytes) + FileContent, + # (filename, file (or bytes)) + Tuple[Optional[str], FileContent], + # (filename, file (or bytes), content_type) + Tuple[Optional[str], FileContent, Optional[str]], + # (filename, file (or bytes), content_type, headers) + Tuple[ + Optional[str], + FileContent, + Optional[str], + Mapping[str, str], + ], +] + + +def convert_file_dict_to_httpx_tuples( + d: Dict[str, Union[File, List[File]]], +) -> List[Tuple[str, File]]: + """ + The format we use is a list of tuples, where the first element is the + name of the file and the second is the file object. Typically HTTPX wants + a dict, but to be able to send lists of files, you have to use the list + approach (which also works for non-lists) + https://github.com/encode/httpx/pull/1032 + """ + + httpx_tuples = [] + for key, file_like in d.items(): + if isinstance(file_like, list): + for file_like_item in file_like: + httpx_tuples.append((key, file_like_item)) + else: + httpx_tuples.append((key, file_like)) + return httpx_tuples + + +def with_content_type(*, file: File, content_type: str) -> File: + """ """ + if isinstance(file, tuple): + if len(file) == 2: + filename, content = cast(Tuple[Optional[str], FileContent], file) # type: ignore + return (filename, content, content_type) + elif len(file) == 3: + filename, content, _ = cast(Tuple[Optional[str], FileContent, Optional[str]], file) # type: ignore + return (filename, content, content_type) + elif len(file) == 4: + filename, content, _, headers = cast( # type: ignore + Tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], file + ) + return (filename, content, content_type, headers) + else: + raise ValueError(f"Unexpected tuple length: {len(file)}") + return (None, file, content_type) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/http_client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/http_client.py new file mode 100644 index 00000000000..eb4e8943cec --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/http_client.py @@ -0,0 +1,487 @@ +# This file was auto-generated by Fern from our API Definition. + +import asyncio +import email.utils +import json +import re +import time +import typing +import urllib.parse +from contextlib import asynccontextmanager, contextmanager +from random import random + +import httpx + +from .file import File, convert_file_dict_to_httpx_tuples +from .jsonable_encoder import jsonable_encoder +from .query_encoder import encode_query +from .remove_none_from_dict import remove_none_from_dict +from .request_options import RequestOptions + +INITIAL_RETRY_DELAY_SECONDS = 0.5 +MAX_RETRY_DELAY_SECONDS = 10 +MAX_RETRY_DELAY_SECONDS_FROM_HEADER = 30 + + +def _parse_retry_after(response_headers: httpx.Headers) -> typing.Optional[float]: + """ + This function parses the `Retry-After` header in a HTTP response and returns the number of seconds to wait. + + Inspired by the urllib3 retry implementation. + """ + retry_after_ms = response_headers.get("retry-after-ms") + if retry_after_ms is not None: + try: + return int(retry_after_ms) / 1000 if retry_after_ms > 0 else 0 + except Exception: + pass + + retry_after = response_headers.get("retry-after") + if retry_after is None: + return None + + # Attempt to parse the header as an int. + if re.match(r"^\s*[0-9]+\s*$", retry_after): + seconds = float(retry_after) + # Fallback to parsing it as a date. + else: + retry_date_tuple = email.utils.parsedate_tz(retry_after) + if retry_date_tuple is None: + return None + if retry_date_tuple[9] is None: # Python 2 + # Assume UTC if no timezone was specified + # On Python2.7, parsedate_tz returns None for a timezone offset + # instead of 0 if no timezone is given, where mktime_tz treats + # a None timezone offset as local time. + retry_date_tuple = retry_date_tuple[:9] + (0,) + retry_date_tuple[10:] + + retry_date = email.utils.mktime_tz(retry_date_tuple) + seconds = retry_date - time.time() + + if seconds < 0: + seconds = 0 + + return seconds + + +def _retry_timeout(response: httpx.Response, retries: int) -> float: + """ + Determine the amount of time to wait before retrying a request. + This function begins by trying to parse a retry-after header from the response, and then proceeds to use exponential backoff + with a jitter to determine the number of seconds to wait. + """ + + # If the API asks us to wait a certain amount of time (and it's a reasonable amount), just do what it says. + retry_after = _parse_retry_after(response.headers) + if retry_after is not None and retry_after <= MAX_RETRY_DELAY_SECONDS_FROM_HEADER: + return retry_after + + # Apply exponential backoff, capped at MAX_RETRY_DELAY_SECONDS. + retry_delay = min(INITIAL_RETRY_DELAY_SECONDS * pow(2.0, retries), MAX_RETRY_DELAY_SECONDS) + + # Add a randomness / jitter to the retry delay to avoid overwhelming the server with retries. + timeout = retry_delay * (1 - 0.25 * random()) + return timeout if timeout >= 0 else 0 + + +def _should_retry(response: httpx.Response) -> bool: + retriable_400s = [429, 408, 409] + return response.status_code >= 500 or response.status_code in retriable_400s + + +def remove_omit_from_dict( + original: typing.Dict[str, typing.Optional[typing.Any]], + omit: typing.Optional[typing.Any], +) -> typing.Dict[str, typing.Any]: + if omit is None: + return original + new: typing.Dict[str, typing.Any] = {} + for key, value in original.items(): + if value is not omit: + new[key] = value + return new + + +def maybe_filter_request_body( + data: typing.Optional[typing.Any], + request_options: typing.Optional[RequestOptions], + omit: typing.Optional[typing.Any], +) -> typing.Optional[typing.Any]: + if data is None: + return ( + jsonable_encoder(request_options.get("additional_body_parameters", {})) or {} + if request_options is not None + else None + ) + elif not isinstance(data, typing.Mapping): + data_content = jsonable_encoder(data) + else: + data_content = { + **(jsonable_encoder(remove_omit_from_dict(data, omit))), # type: ignore + **( + jsonable_encoder(request_options.get("additional_body_parameters", {})) or {} + if request_options is not None + else {} + ), + } + return data_content + + +# Abstracted out for testing purposes +def get_request_body( + *, + json: typing.Optional[typing.Any], + data: typing.Optional[typing.Any], + request_options: typing.Optional[RequestOptions], + omit: typing.Optional[typing.Any], +) -> typing.Tuple[typing.Optional[typing.Any], typing.Optional[typing.Any]]: + json_body = None + data_body = None + if data is not None: + data_body = maybe_filter_request_body(data, request_options, omit) + else: + # If both data and json are None, we send json data in the event extra properties are specified + json_body = maybe_filter_request_body(json, request_options, omit) + + # If you have an empty JSON body, you should just send None + return (json_body if json_body != {} else None), data_body if data_body != {} else None + + +class HttpClient: + def __init__( + self, + *, + httpx_client: httpx.Client, + base_timeout: typing.Callable[[], typing.Optional[float]], + base_headers: typing.Callable[[], typing.Dict[str, str]], + base_url: typing.Optional[typing.Callable[[], str]] = None, + ): + self.base_url = base_url + self.base_timeout = base_timeout + self.base_headers = base_headers + self.httpx_client = httpx_client + + def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str: + base_url = maybe_base_url + if self.base_url is not None and base_url is None: + base_url = self.base_url() + + if base_url is None: + raise ValueError("A base_url is required to make this request, please provide one and try again.") + return base_url + + def request( + self, + path: typing.Optional[str] = None, + *, + method: str, + base_url: typing.Optional[str] = None, + params: typing.Optional[typing.Dict[str, typing.Any]] = None, + json: typing.Optional[typing.Any] = None, + data: typing.Optional[typing.Any] = None, + content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, + files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + headers: typing.Optional[typing.Dict[str, typing.Any]] = None, + request_options: typing.Optional[RequestOptions] = None, + retries: int = 0, + omit: typing.Optional[typing.Any] = None, + ) -> httpx.Response: + base_url = self.get_base_url(base_url) + timeout = ( + request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else self.base_timeout() + ) + + json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) + + response = self.httpx_client.request( + method=method, + url=urllib.parse.urljoin(f"{base_url}/", path), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self.base_headers(), + **(headers if headers is not None else {}), + **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}), + } + ) + ), + params=encode_query( + jsonable_encoder( + remove_none_from_dict( + remove_omit_from_dict( + { + **(params if params is not None else {}), + **( + request_options.get("additional_query_parameters", {}) or {} + if request_options is not None + else {} + ), + }, + omit, + ) + ) + ) + ), + json=json_body, + data=data_body, + content=content, + files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files)) + if (files is not None and files is not omit) + else None, + timeout=timeout, + ) + + max_retries: int = request_options.get("max_retries", 0) if request_options is not None else 0 + if _should_retry(response=response): + if max_retries > retries: + time.sleep(_retry_timeout(response=response, retries=retries)) + return self.request( + path=path, + method=method, + base_url=base_url, + params=params, + json=json, + content=content, + files=files, + headers=headers, + request_options=request_options, + retries=retries + 1, + omit=omit, + ) + + return response + + @contextmanager + def stream( + self, + path: typing.Optional[str] = None, + *, + method: str, + base_url: typing.Optional[str] = None, + params: typing.Optional[typing.Dict[str, typing.Any]] = None, + json: typing.Optional[typing.Any] = None, + data: typing.Optional[typing.Any] = None, + content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, + files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + headers: typing.Optional[typing.Dict[str, typing.Any]] = None, + request_options: typing.Optional[RequestOptions] = None, + retries: int = 0, + omit: typing.Optional[typing.Any] = None, + ) -> typing.Iterator[httpx.Response]: + base_url = self.get_base_url(base_url) + timeout = ( + request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else self.base_timeout() + ) + + json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) + + with self.httpx_client.stream( + method=method, + url=urllib.parse.urljoin(f"{base_url}/", path), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self.base_headers(), + **(headers if headers is not None else {}), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + params=encode_query( + jsonable_encoder( + remove_none_from_dict( + remove_omit_from_dict( + { + **(params if params is not None else {}), + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + }, + omit, + ) + ) + ) + ), + json=json_body, + data=data_body, + content=content, + files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files)) + if (files is not None and files is not omit) + else None, + timeout=timeout, + ) as stream: + yield stream + + +class AsyncHttpClient: + def __init__( + self, + *, + httpx_client: httpx.AsyncClient, + base_timeout: typing.Callable[[], typing.Optional[float]], + base_headers: typing.Callable[[], typing.Dict[str, str]], + base_url: typing.Optional[typing.Callable[[], str]] = None, + ): + self.base_url = base_url + self.base_timeout = base_timeout + self.base_headers = base_headers + self.httpx_client = httpx_client + + def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str: + base_url = maybe_base_url + if self.base_url is not None and base_url is None: + base_url = self.base_url() + + if base_url is None: + raise ValueError("A base_url is required to make this request, please provide one and try again.") + return base_url + + async def request( + self, + path: typing.Optional[str] = None, + *, + method: str, + base_url: typing.Optional[str] = None, + params: typing.Optional[typing.Dict[str, typing.Any]] = None, + json: typing.Optional[typing.Any] = None, + data: typing.Optional[typing.Any] = None, + content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, + files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + headers: typing.Optional[typing.Dict[str, typing.Any]] = None, + request_options: typing.Optional[RequestOptions] = None, + retries: int = 0, + omit: typing.Optional[typing.Any] = None, + ) -> httpx.Response: + base_url = self.get_base_url(base_url) + timeout = ( + request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else self.base_timeout() + ) + + json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) + + # Add the input to each of these and do None-safety checks + response = await self.httpx_client.request( + method=method, + url=urllib.parse.urljoin(f"{base_url}/", path), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self.base_headers(), + **(headers if headers is not None else {}), + **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}), + } + ) + ), + params=encode_query( + jsonable_encoder( + remove_none_from_dict( + remove_omit_from_dict( + { + **(params if params is not None else {}), + **( + request_options.get("additional_query_parameters", {}) or {} + if request_options is not None + else {} + ), + }, + omit, + ) + ) + ) + ), + json=json_body, + data=data_body, + content=content, + files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files)) if files is not None else None, + timeout=timeout, + ) + + max_retries: int = request_options.get("max_retries", 0) if request_options is not None else 0 + if _should_retry(response=response): + if max_retries > retries: + await asyncio.sleep(_retry_timeout(response=response, retries=retries)) + return await self.request( + path=path, + method=method, + base_url=base_url, + params=params, + json=json, + content=content, + files=files, + headers=headers, + request_options=request_options, + retries=retries + 1, + omit=omit, + ) + return response + + @asynccontextmanager + async def stream( + self, + path: typing.Optional[str] = None, + *, + method: str, + base_url: typing.Optional[str] = None, + params: typing.Optional[typing.Dict[str, typing.Any]] = None, + json: typing.Optional[typing.Any] = None, + data: typing.Optional[typing.Any] = None, + content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, + files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + headers: typing.Optional[typing.Dict[str, typing.Any]] = None, + request_options: typing.Optional[RequestOptions] = None, + retries: int = 0, + omit: typing.Optional[typing.Any] = None, + ) -> typing.AsyncIterator[httpx.Response]: + base_url = self.get_base_url(base_url) + timeout = ( + request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else self.base_timeout() + ) + + json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) + + async with self.httpx_client.stream( + method=method, + url=urllib.parse.urljoin(f"{base_url}/", path), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self.base_headers(), + **(headers if headers is not None else {}), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + params=encode_query( + jsonable_encoder( + remove_none_from_dict( + remove_omit_from_dict( + { + **(params if params is not None else {}), + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + }, + omit=omit, + ) + ) + ) + ), + json=json_body, + data=data_body, + content=content, + files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files)) if files is not None else None, + timeout=timeout, + ) as stream: + yield stream diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/jsonable_encoder.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/jsonable_encoder.py new file mode 100644 index 00000000000..1b631e9017c --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/jsonable_encoder.py @@ -0,0 +1,101 @@ +# This file was auto-generated by Fern from our API Definition. + +""" +jsonable_encoder converts a Python object to a JSON-friendly dict +(e.g. datetimes to strings, Pydantic models to dicts). + +Taken from FastAPI, and made a bit simpler +https://github.com/tiangolo/fastapi/blob/master/fastapi/encoders.py +""" + +import base64 +import dataclasses +import datetime as dt +from enum import Enum +from pathlib import PurePath +from types import GeneratorType +from typing import Any, Callable, Dict, List, Optional, Set, Union + +import pydantic + +from .datetime_utils import serialize_datetime +from .pydantic_utilities import ( + IS_PYDANTIC_V2, + encode_by_type, + to_jsonable_with_fallback, +) + +SetIntStr = Set[Union[int, str]] +DictIntStrAny = Dict[Union[int, str], Any] + + +def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any], Any]]] = None) -> Any: + custom_encoder = custom_encoder or {} + if custom_encoder: + if type(obj) in custom_encoder: + return custom_encoder[type(obj)](obj) + else: + for encoder_type, encoder_instance in custom_encoder.items(): + if isinstance(obj, encoder_type): + return encoder_instance(obj) + if isinstance(obj, pydantic.BaseModel): + if IS_PYDANTIC_V2: + encoder = getattr(obj.model_config, "json_encoders", {}) # type: ignore # Pydantic v2 + else: + encoder = getattr(obj.__config__, "json_encoders", {}) # type: ignore # Pydantic v1 + if custom_encoder: + encoder.update(custom_encoder) + obj_dict = obj.dict(by_alias=True) + if "__root__" in obj_dict: + obj_dict = obj_dict["__root__"] + if "root" in obj_dict: + obj_dict = obj_dict["root"] + return jsonable_encoder(obj_dict, custom_encoder=encoder) + if dataclasses.is_dataclass(obj): + obj_dict = dataclasses.asdict(obj) # type: ignore + return jsonable_encoder(obj_dict, custom_encoder=custom_encoder) + if isinstance(obj, bytes): + return base64.b64encode(obj).decode("utf-8") + if isinstance(obj, Enum): + return obj.value + if isinstance(obj, PurePath): + return str(obj) + if isinstance(obj, (str, int, float, type(None))): + return obj + if isinstance(obj, dt.datetime): + return serialize_datetime(obj) + if isinstance(obj, dt.date): + return str(obj) + if isinstance(obj, dict): + encoded_dict = {} + allowed_keys = set(obj.keys()) + for key, value in obj.items(): + if key in allowed_keys: + encoded_key = jsonable_encoder(key, custom_encoder=custom_encoder) + encoded_value = jsonable_encoder(value, custom_encoder=custom_encoder) + encoded_dict[encoded_key] = encoded_value + return encoded_dict + if isinstance(obj, (list, set, frozenset, GeneratorType, tuple)): + encoded_list = [] + for item in obj: + encoded_list.append(jsonable_encoder(item, custom_encoder=custom_encoder)) + return encoded_list + + def fallback_serializer(o: Any) -> Any: + attempt_encode = encode_by_type(o) + if attempt_encode is not None: + return attempt_encode + + try: + data = dict(o) + except Exception as e: + errors: List[Exception] = [] + errors.append(e) + try: + data = vars(o) + except Exception as e: + errors.append(e) + raise ValueError(errors) from e + return jsonable_encoder(data, custom_encoder=custom_encoder) + + return to_jsonable_with_fallback(obj, fallback_serializer) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/pydantic_utilities.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/pydantic_utilities.py new file mode 100644 index 00000000000..ee8f0e4105f --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/pydantic_utilities.py @@ -0,0 +1,296 @@ +# This file was auto-generated by Fern from our API Definition. + +# nopycln: file +import datetime as dt +import typing +from collections import defaultdict + +import typing_extensions + +import pydantic + +from .datetime_utils import serialize_datetime +from .serialization import convert_and_respect_annotation_metadata + +IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.") + +if IS_PYDANTIC_V2: + # isort will try to reformat the comments on these imports, which breaks mypy + # isort: off + from pydantic.v1.datetime_parse import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 + parse_date as parse_date, + ) + from pydantic.v1.datetime_parse import ( # pyright: ignore[reportMissingImports] # Pydantic v2 + parse_datetime as parse_datetime, + ) + from pydantic.v1.json import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 + ENCODERS_BY_TYPE as encoders_by_type, + ) + from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 + get_args as get_args, + ) + from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 + get_origin as get_origin, + ) + from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 + is_literal_type as is_literal_type, + ) + from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 + is_union as is_union, + ) + from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 +else: + from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1 + from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore # Pydantic v1 + from pydantic.fields import ModelField as ModelField # type: ignore # Pydantic v1 + from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore # Pydantic v1 + from pydantic.typing import get_args as get_args # type: ignore # Pydantic v1 + from pydantic.typing import get_origin as get_origin # type: ignore # Pydantic v1 + from pydantic.typing import is_literal_type as is_literal_type # type: ignore # Pydantic v1 + from pydantic.typing import is_union as is_union # type: ignore # Pydantic v1 + + # isort: on + + +T = typing.TypeVar("T") +Model = typing.TypeVar("Model", bound=pydantic.BaseModel) + + +def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T: + dealiased_object = convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read") + if IS_PYDANTIC_V2: + adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2 + return adapter.validate_python(dealiased_object) + else: + return pydantic.parse_obj_as(type_, dealiased_object) + + +def to_jsonable_with_fallback( + obj: typing.Any, fallback_serializer: typing.Callable[[typing.Any], typing.Any] +) -> typing.Any: + if IS_PYDANTIC_V2: + from pydantic_core import to_jsonable_python + + return to_jsonable_python(obj, fallback=fallback_serializer) + else: + return fallback_serializer(obj) + + +class UniversalBaseModel(pydantic.BaseModel): + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + # Allow fields begining with `model_` to be used in the model + protected_namespaces=(), + ) # type: ignore # Pydantic v2 + + @pydantic.model_serializer(mode="wrap", when_used="json") # type: ignore # Pydantic v2 + def serialize_model(self, handler: pydantic.SerializerFunctionWrapHandler) -> typing.Any: # type: ignore # Pydantic v2 + serialized = handler(self) + data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()} + return data + + else: + + class Config: + smart_union = True + json_encoders = {dt.datetime: serialize_datetime} + + @classmethod + def model_construct( + cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any + ) -> "Model": + dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read") + return cls.construct(_fields_set, **dealiased_object) + + @classmethod + def construct( + cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any + ) -> "Model": + dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read") + if IS_PYDANTIC_V2: + return super().model_construct(_fields_set, **dealiased_object) # type: ignore # Pydantic v2 + else: + return super().construct(_fields_set, **dealiased_object) + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + if IS_PYDANTIC_V2: + return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2 + else: + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + """ + Override the default dict method to `exclude_unset` by default. This function patches + `exclude_unset` to work include fields within non-None default values. + """ + # Note: the logic here is multi-plexed given the levers exposed in Pydantic V1 vs V2 + # Pydantic V1's .dict can be extremely slow, so we do not want to call it twice. + # + # We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models + # that we have less control over, and this is less intrusive than custom serializers for now. + if IS_PYDANTIC_V2: + kwargs_with_defaults_exclude_unset: typing.Any = { + **kwargs, + "by_alias": True, + "exclude_unset": True, + "exclude_none": False, + } + kwargs_with_defaults_exclude_none: typing.Any = { + **kwargs, + "by_alias": True, + "exclude_none": True, + "exclude_unset": False, + } + dict_dump = deep_union_pydantic_dicts( + super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2 + super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2 + ) + + else: + _fields_set = self.__fields_set__.copy() + + fields = _get_model_fields(self.__class__) + for name, field in fields.items(): + if name not in _fields_set: + default = _get_field_default(field) + + # If the default values are non-null act like they've been set + # This effectively allows exclude_unset to work like exclude_none where + # the latter passes through intentionally set none values. + if default is not None or ("exclude_unset" in kwargs and not kwargs["exclude_unset"]): + _fields_set.add(name) + + if default is not None: + self.__fields_set__.add(name) + + kwargs_with_defaults_exclude_unset_include_fields: typing.Any = { + "by_alias": True, + "exclude_unset": True, + "include": _fields_set, + **kwargs, + } + + dict_dump = super().dict(**kwargs_with_defaults_exclude_unset_include_fields) + + return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write") + + +def _union_list_of_pydantic_dicts( + source: typing.List[typing.Any], destination: typing.List[typing.Any] +) -> typing.List[typing.Any]: + converted_list: typing.List[typing.Any] = [] + for i, item in enumerate(source): + destination_value = destination[i] # type: ignore + if isinstance(item, dict): + converted_list.append(deep_union_pydantic_dicts(item, destination_value)) + elif isinstance(item, list): + converted_list.append(_union_list_of_pydantic_dicts(item, destination_value)) + else: + converted_list.append(item) + return converted_list + + +def deep_union_pydantic_dicts( + source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any] +) -> typing.Dict[str, typing.Any]: + for key, value in source.items(): + node = destination.setdefault(key, {}) + if isinstance(value, dict): + deep_union_pydantic_dicts(value, node) + # Note: we do not do this same processing for sets given we do not have sets of models + # and given the sets are unordered, the processing of the set and matching objects would + # be non-trivial. + elif isinstance(value, list): + destination[key] = _union_list_of_pydantic_dicts(value, node) + else: + destination[key] = value + + return destination + + +if IS_PYDANTIC_V2: + + class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2 + pass + + UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore +else: + UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore + + +def encode_by_type(o: typing.Any) -> typing.Any: + encoders_by_class_tuples: typing.Dict[typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...]] = ( + defaultdict(tuple) + ) + for type_, encoder in encoders_by_type.items(): + encoders_by_class_tuples[encoder] += (type_,) + + if type(o) in encoders_by_type: + return encoders_by_type[type(o)](o) + for encoder, classes_tuple in encoders_by_class_tuples.items(): + if isinstance(o, classes_tuple): + return encoder(o) + + +def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None: + if IS_PYDANTIC_V2: + model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2 + else: + model.update_forward_refs(**localns) + + +# Mirrors Pydantic's internal typing +AnyCallable = typing.Callable[..., typing.Any] + + +def universal_root_validator( + pre: bool = False, +) -> typing.Callable[[AnyCallable], AnyCallable]: + def decorator(func: AnyCallable) -> AnyCallable: + if IS_PYDANTIC_V2: + return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 + else: + return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1 + + return decorator + + +def universal_field_validator(field_name: str, pre: bool = False) -> typing.Callable[[AnyCallable], AnyCallable]: + def decorator(func: AnyCallable) -> AnyCallable: + if IS_PYDANTIC_V2: + return pydantic.field_validator(field_name, mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 + else: + return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1 + + return decorator + + +PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo] + + +def _get_model_fields( + model: typing.Type["Model"], +) -> typing.Mapping[str, PydanticField]: + if IS_PYDANTIC_V2: + return model.model_fields # type: ignore # Pydantic v2 + else: + return model.__fields__ # type: ignore # Pydantic v1 + + +def _get_field_default(field: PydanticField) -> typing.Any: + try: + value = field.get_default() # type: ignore # Pydantic < v1.10.15 + except: + value = field.default + if IS_PYDANTIC_V2: + from pydantic_core import PydanticUndefined + + if value == PydanticUndefined: + return None + return value + return value diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/query_encoder.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/query_encoder.py new file mode 100644 index 00000000000..3183001d404 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/query_encoder.py @@ -0,0 +1,58 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import Any, Dict, List, Optional, Tuple + +import pydantic + + +# Flattens dicts to be of the form {"key[subkey][subkey2]": value} where value is not a dict +def traverse_query_dict(dict_flat: Dict[str, Any], key_prefix: Optional[str] = None) -> List[Tuple[str, Any]]: + result = [] + for k, v in dict_flat.items(): + key = f"{key_prefix}[{k}]" if key_prefix is not None else k + if isinstance(v, dict): + result.extend(traverse_query_dict(v, key)) + elif isinstance(v, list): + for arr_v in v: + if isinstance(arr_v, dict): + result.extend(traverse_query_dict(arr_v, key)) + else: + result.append((key, arr_v)) + else: + result.append((key, v)) + return result + + +def single_query_encoder(query_key: str, query_value: Any) -> List[Tuple[str, Any]]: + if isinstance(query_value, pydantic.BaseModel) or isinstance(query_value, dict): + if isinstance(query_value, pydantic.BaseModel): + obj_dict = query_value.dict(by_alias=True) + else: + obj_dict = query_value + return traverse_query_dict(obj_dict, query_key) + elif isinstance(query_value, list): + encoded_values: List[Tuple[str, Any]] = [] + for value in query_value: + if isinstance(value, pydantic.BaseModel) or isinstance(value, dict): + if isinstance(value, pydantic.BaseModel): + obj_dict = value.dict(by_alias=True) + elif isinstance(value, dict): + obj_dict = value + + encoded_values.extend(single_query_encoder(query_key, obj_dict)) + else: + encoded_values.append((query_key, value)) + + return encoded_values + + return [(query_key, query_value)] + + +def encode_query(query: Optional[Dict[str, Any]]) -> Optional[List[Tuple[str, Any]]]: + if query is None: + return None + + encoded_query = [] + for k, v in query.items(): + encoded_query.extend(single_query_encoder(k, v)) + return encoded_query diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/remove_none_from_dict.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/remove_none_from_dict.py new file mode 100644 index 00000000000..c2298143f14 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/remove_none_from_dict.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import Any, Dict, Mapping, Optional + + +def remove_none_from_dict(original: Mapping[str, Optional[Any]]) -> Dict[str, Any]: + new: Dict[str, Any] = {} + for key, value in original.items(): + if value is not None: + new[key] = value + return new diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/request_options.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/request_options.py new file mode 100644 index 00000000000..1b38804432b --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/request_options.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +try: + from typing import NotRequired # type: ignore +except ImportError: + from typing_extensions import NotRequired + + +class RequestOptions(typing.TypedDict, total=False): + """ + Additional options for request-specific configuration when calling APIs via the SDK. + This is used primarily as an optional final parameter for service functions. + + Attributes: + - timeout_in_seconds: int. The number of seconds to await an API call before timing out. + + - max_retries: int. The max number of retries to attempt if the API call fails. + + - additional_headers: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's header dict + + - additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict + + - additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict + + - chunk_size: int. The size, in bytes, to process each chunk of data being streamed back within the response. This equates to leveraging `chunk_size` within `requests` or `httpx`, and is only leveraged for file downloads. + """ + + timeout_in_seconds: NotRequired[int] + max_retries: NotRequired[int] + additional_headers: NotRequired[typing.Dict[str, typing.Any]] + additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]] + additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]] + chunk_size: NotRequired[int] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/serialization.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/serialization.py new file mode 100644 index 00000000000..cb5dcbf93a9 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/core/serialization.py @@ -0,0 +1,272 @@ +# This file was auto-generated by Fern from our API Definition. + +import collections +import inspect +import typing + +import typing_extensions + +import pydantic + + +class FieldMetadata: + """ + Metadata class used to annotate fields to provide additional information. + + Example: + class MyDict(TypedDict): + field: typing.Annotated[str, FieldMetadata(alias="field_name")] + + Will serialize: `{"field": "value"}` + To: `{"field_name": "value"}` + """ + + alias: str + + def __init__(self, *, alias: str) -> None: + self.alias = alias + + +def convert_and_respect_annotation_metadata( + *, + object_: typing.Any, + annotation: typing.Any, + inner_type: typing.Optional[typing.Any] = None, + direction: typing.Literal["read", "write"], +) -> typing.Any: + """ + Respect the metadata annotations on a field, such as aliasing. This function effectively + manipulates the dict-form of an object to respect the metadata annotations. This is primarily used for + TypedDicts, which cannot support aliasing out of the box, and can be extended for additional + utilities, such as defaults. + + Parameters + ---------- + object_ : typing.Any + + annotation : type + The type we're looking to apply typing annotations from + + inner_type : typing.Optional[type] + + Returns + ------- + typing.Any + """ + + if object_ is None: + return None + if inner_type is None: + inner_type = annotation + + clean_type = _remove_annotations(inner_type) + # Pydantic models + if ( + inspect.isclass(clean_type) + and issubclass(clean_type, pydantic.BaseModel) + and isinstance(object_, typing.Mapping) + ): + return _convert_mapping(object_, clean_type, direction) + # TypedDicts + if typing_extensions.is_typeddict(clean_type) and isinstance(object_, typing.Mapping): + return _convert_mapping(object_, clean_type, direction) + + if ( + typing_extensions.get_origin(clean_type) == typing.Dict + or typing_extensions.get_origin(clean_type) == dict + or clean_type == typing.Dict + ) and isinstance(object_, typing.Dict): + key_type = typing_extensions.get_args(clean_type)[0] + value_type = typing_extensions.get_args(clean_type)[1] + + return { + key: convert_and_respect_annotation_metadata( + object_=value, + annotation=annotation, + inner_type=value_type, + direction=direction, + ) + for key, value in object_.items() + } + + # If you're iterating on a string, do not bother to coerce it to a sequence. + if not isinstance(object_, str): + if ( + typing_extensions.get_origin(clean_type) == typing.Set + or typing_extensions.get_origin(clean_type) == set + or clean_type == typing.Set + ) and isinstance(object_, typing.Set): + inner_type = typing_extensions.get_args(clean_type)[0] + return { + convert_and_respect_annotation_metadata( + object_=item, + annotation=annotation, + inner_type=inner_type, + direction=direction, + ) + for item in object_ + } + elif ( + ( + typing_extensions.get_origin(clean_type) == typing.List + or typing_extensions.get_origin(clean_type) == list + or clean_type == typing.List + ) + and isinstance(object_, typing.List) + ) or ( + ( + typing_extensions.get_origin(clean_type) == typing.Sequence + or typing_extensions.get_origin(clean_type) == collections.abc.Sequence + or clean_type == typing.Sequence + ) + and isinstance(object_, typing.Sequence) + ): + inner_type = typing_extensions.get_args(clean_type)[0] + return [ + convert_and_respect_annotation_metadata( + object_=item, + annotation=annotation, + inner_type=inner_type, + direction=direction, + ) + for item in object_ + ] + + if typing_extensions.get_origin(clean_type) == typing.Union: + # We should be able to ~relatively~ safely try to convert keys against all + # member types in the union, the edge case here is if one member aliases a field + # of the same name to a different name from another member + # Or if another member aliases a field of the same name that another member does not. + for member in typing_extensions.get_args(clean_type): + object_ = convert_and_respect_annotation_metadata( + object_=object_, + annotation=annotation, + inner_type=member, + direction=direction, + ) + return object_ + + annotated_type = _get_annotation(annotation) + if annotated_type is None: + return object_ + + # If the object is not a TypedDict, a Union, or other container (list, set, sequence, etc.) + # Then we can safely call it on the recursive conversion. + return object_ + + +def _convert_mapping( + object_: typing.Mapping[str, object], + expected_type: typing.Any, + direction: typing.Literal["read", "write"], +) -> typing.Mapping[str, object]: + converted_object: typing.Dict[str, object] = {} + annotations = typing_extensions.get_type_hints(expected_type, include_extras=True) + aliases_to_field_names = _get_alias_to_field_name(annotations) + for key, value in object_.items(): + if direction == "read" and key in aliases_to_field_names: + dealiased_key = aliases_to_field_names.get(key) + if dealiased_key is not None: + type_ = annotations.get(dealiased_key) + else: + type_ = annotations.get(key) + # Note you can't get the annotation by the field name if you're in read mode, so you must check the aliases map + # + # So this is effectively saying if we're in write mode, and we don't have a type, or if we're in read mode and we don't have an alias + # then we can just pass the value through as is + if type_ is None: + converted_object[key] = value + elif direction == "read" and key not in aliases_to_field_names: + converted_object[key] = convert_and_respect_annotation_metadata( + object_=value, annotation=type_, direction=direction + ) + else: + converted_object[_alias_key(key, type_, direction, aliases_to_field_names)] = ( + convert_and_respect_annotation_metadata(object_=value, annotation=type_, direction=direction) + ) + return converted_object + + +def _get_annotation(type_: typing.Any) -> typing.Optional[typing.Any]: + maybe_annotated_type = typing_extensions.get_origin(type_) + if maybe_annotated_type is None: + return None + + if maybe_annotated_type == typing_extensions.NotRequired: + type_ = typing_extensions.get_args(type_)[0] + maybe_annotated_type = typing_extensions.get_origin(type_) + + if maybe_annotated_type == typing_extensions.Annotated: + return type_ + + return None + + +def _remove_annotations(type_: typing.Any) -> typing.Any: + maybe_annotated_type = typing_extensions.get_origin(type_) + if maybe_annotated_type is None: + return type_ + + if maybe_annotated_type == typing_extensions.NotRequired: + return _remove_annotations(typing_extensions.get_args(type_)[0]) + + if maybe_annotated_type == typing_extensions.Annotated: + return _remove_annotations(typing_extensions.get_args(type_)[0]) + + return type_ + + +def get_alias_to_field_mapping(type_: typing.Any) -> typing.Dict[str, str]: + annotations = typing_extensions.get_type_hints(type_, include_extras=True) + return _get_alias_to_field_name(annotations) + + +def get_field_to_alias_mapping(type_: typing.Any) -> typing.Dict[str, str]: + annotations = typing_extensions.get_type_hints(type_, include_extras=True) + return _get_field_to_alias_name(annotations) + + +def _get_alias_to_field_name( + field_to_hint: typing.Dict[str, typing.Any], +) -> typing.Dict[str, str]: + aliases = {} + for field, hint in field_to_hint.items(): + maybe_alias = _get_alias_from_type(hint) + if maybe_alias is not None: + aliases[maybe_alias] = field + return aliases + + +def _get_field_to_alias_name( + field_to_hint: typing.Dict[str, typing.Any], +) -> typing.Dict[str, str]: + aliases = {} + for field, hint in field_to_hint.items(): + maybe_alias = _get_alias_from_type(hint) + if maybe_alias is not None: + aliases[field] = maybe_alias + return aliases + + +def _get_alias_from_type(type_: typing.Any) -> typing.Optional[str]: + maybe_annotated_type = _get_annotation(type_) + + if maybe_annotated_type is not None: + # The actual annotations are 1 onward, the first is the annotated type + annotations = typing_extensions.get_args(maybe_annotated_type)[1:] + + for annotation in annotations: + if isinstance(annotation, FieldMetadata) and annotation.alias is not None: + return annotation.alias + return None + + +def _alias_key( + key: str, + type_: typing.Any, + direction: typing.Literal["read", "write"], + aliases_to_field_names: typing.Dict[str, str], +) -> str: + if direction == "read": + return aliases_to_field_names.get(key, key) + return _get_alias_from_type(type_=type_) or key diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/__init__.py new file mode 100644 index 00000000000..92307cab7fe --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from . import container, enum, http_methods, object, params, primitive, union + +__all__ = ["container", "enum", "http_methods", "object", "params", "primitive", "union"] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/client.py new file mode 100644 index 00000000000..69930de54d7 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/client.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.client_wrapper import SyncClientWrapper +from .container.client import ContainerClient +from .enum.client import EnumClient +from .http_methods.client import HttpMethodsClient +from .object.client import ObjectClient +from .params.client import ParamsClient +from .primitive.client import PrimitiveClient +from .union.client import UnionClient +from ..core.client_wrapper import AsyncClientWrapper +from .container.client import AsyncContainerClient +from .enum.client import AsyncEnumClient +from .http_methods.client import AsyncHttpMethodsClient +from .object.client import AsyncObjectClient +from .params.client import AsyncParamsClient +from .primitive.client import AsyncPrimitiveClient +from .union.client import AsyncUnionClient + + +class EndpointsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + self.container = ContainerClient(client_wrapper=self._client_wrapper) + self.enum = EnumClient(client_wrapper=self._client_wrapper) + self.http_methods = HttpMethodsClient(client_wrapper=self._client_wrapper) + self.object = ObjectClient(client_wrapper=self._client_wrapper) + self.params = ParamsClient(client_wrapper=self._client_wrapper) + self.primitive = PrimitiveClient(client_wrapper=self._client_wrapper) + self.union = UnionClient(client_wrapper=self._client_wrapper) + + +class AsyncEndpointsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + self.container = AsyncContainerClient(client_wrapper=self._client_wrapper) + self.enum = AsyncEnumClient(client_wrapper=self._client_wrapper) + self.http_methods = AsyncHttpMethodsClient(client_wrapper=self._client_wrapper) + self.object = AsyncObjectClient(client_wrapper=self._client_wrapper) + self.params = AsyncParamsClient(client_wrapper=self._client_wrapper) + self.primitive = AsyncPrimitiveClient(client_wrapper=self._client_wrapper) + self.union = AsyncUnionClient(client_wrapper=self._client_wrapper) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/container/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/container/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/container/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/container/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/container/client.py new file mode 100644 index 00000000000..e9a91f68d59 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/container/client.py @@ -0,0 +1,834 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ...core.client_wrapper import SyncClientWrapper +from ...core.request_options import RequestOptions +from ...core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ...core.api_error import ApiError +from ...types.object.types.object_with_required_field import ObjectWithRequiredField +from ...core.serialization import convert_and_respect_annotation_metadata +from ...core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ContainerClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get_and_return_list_of_primitives( + self, *, request: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[str]: + """ + Parameters + ---------- + request : typing.Sequence[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[str] + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.container.get_and_return_list_of_primitives( + request=["string", "string"], + ) + """ + _response = self._client_wrapper.httpx_client.request( + "container/list-of-primitives", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[str], + parse_obj_as( + type_=typing.List[str], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_list_of_objects( + self, + *, + request: typing.Sequence[ObjectWithRequiredField], + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.List[ObjectWithRequiredField]: + """ + Parameters + ---------- + request : typing.Sequence[ObjectWithRequiredField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[ObjectWithRequiredField] + + Examples + -------- + from seed import SeedExhaustive + from seed.types.object import ObjectWithRequiredField + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.container.get_and_return_list_of_objects( + request=[ + ObjectWithRequiredField( + string="string", + ), + ObjectWithRequiredField( + string="string", + ), + ], + ) + """ + _response = self._client_wrapper.httpx_client.request( + "container/list-of-objects", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=typing.Sequence[ObjectWithRequiredField], direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ObjectWithRequiredField], + parse_obj_as( + type_=typing.List[ObjectWithRequiredField], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_set_of_primitives( + self, *, request: typing.Set[str], request_options: typing.Optional[RequestOptions] = None + ) -> typing.Set[str]: + """ + Parameters + ---------- + request : typing.Set[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Set[str] + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.container.get_and_return_set_of_primitives( + request={"string"}, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "container/set-of-primitives", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Set[str], + parse_obj_as( + type_=typing.Set[str], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_set_of_objects( + self, + *, + request: typing.Sequence[ObjectWithRequiredField], + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.List[ObjectWithRequiredField]: + """ + Parameters + ---------- + request : typing.Sequence[ObjectWithRequiredField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[ObjectWithRequiredField] + + Examples + -------- + from seed import SeedExhaustive + from seed.types.object import ObjectWithRequiredField + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.container.get_and_return_set_of_objects( + request=[ + ObjectWithRequiredField( + string="string", + ) + ], + ) + """ + _response = self._client_wrapper.httpx_client.request( + "container/set-of-objects", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=typing.Sequence[ObjectWithRequiredField], direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ObjectWithRequiredField], + parse_obj_as( + type_=typing.List[ObjectWithRequiredField], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_map_prim_to_prim( + self, *, request: typing.Dict[str, str], request_options: typing.Optional[RequestOptions] = None + ) -> typing.Dict[str, str]: + """ + Parameters + ---------- + request : typing.Dict[str, str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Dict[str, str] + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.container.get_and_return_map_prim_to_prim( + request={"string": "string"}, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "container/map-prim-to-prim", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Dict[str, str], + parse_obj_as( + type_=typing.Dict[str, str], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_map_of_prim_to_object( + self, + *, + request: typing.Dict[str, ObjectWithRequiredField], + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Dict[str, ObjectWithRequiredField]: + """ + Parameters + ---------- + request : typing.Dict[str, ObjectWithRequiredField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Dict[str, ObjectWithRequiredField] + + Examples + -------- + from seed import SeedExhaustive + from seed.types.object import ObjectWithRequiredField + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.container.get_and_return_map_of_prim_to_object( + request={ + "string": ObjectWithRequiredField( + string="string", + ) + }, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "container/map-prim-to-object", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=typing.Dict[str, ObjectWithRequiredField], direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Dict[str, ObjectWithRequiredField], + parse_obj_as( + type_=typing.Dict[str, ObjectWithRequiredField], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_optional( + self, + *, + request: typing.Optional[ObjectWithRequiredField] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[ObjectWithRequiredField]: + """ + Parameters + ---------- + request : typing.Optional[ObjectWithRequiredField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[ObjectWithRequiredField] + + Examples + -------- + from seed import SeedExhaustive + from seed.types.object import ObjectWithRequiredField + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.container.get_and_return_optional( + request=ObjectWithRequiredField( + string="string", + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "container/opt-objects", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=ObjectWithRequiredField, direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[ObjectWithRequiredField], + parse_obj_as( + type_=typing.Optional[ObjectWithRequiredField], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncContainerClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get_and_return_list_of_primitives( + self, *, request: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[str]: + """ + Parameters + ---------- + request : typing.Sequence[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[str] + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.container.get_and_return_list_of_primitives( + request=["string", "string"], + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "container/list-of-primitives", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[str], + parse_obj_as( + type_=typing.List[str], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_list_of_objects( + self, + *, + request: typing.Sequence[ObjectWithRequiredField], + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.List[ObjectWithRequiredField]: + """ + Parameters + ---------- + request : typing.Sequence[ObjectWithRequiredField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[ObjectWithRequiredField] + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + from seed.types.object import ObjectWithRequiredField + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.container.get_and_return_list_of_objects( + request=[ + ObjectWithRequiredField( + string="string", + ), + ObjectWithRequiredField( + string="string", + ), + ], + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "container/list-of-objects", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=typing.Sequence[ObjectWithRequiredField], direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ObjectWithRequiredField], + parse_obj_as( + type_=typing.List[ObjectWithRequiredField], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_set_of_primitives( + self, *, request: typing.Set[str], request_options: typing.Optional[RequestOptions] = None + ) -> typing.Set[str]: + """ + Parameters + ---------- + request : typing.Set[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Set[str] + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.container.get_and_return_set_of_primitives( + request={"string"}, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "container/set-of-primitives", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Set[str], + parse_obj_as( + type_=typing.Set[str], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_set_of_objects( + self, + *, + request: typing.Sequence[ObjectWithRequiredField], + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.List[ObjectWithRequiredField]: + """ + Parameters + ---------- + request : typing.Sequence[ObjectWithRequiredField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[ObjectWithRequiredField] + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + from seed.types.object import ObjectWithRequiredField + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.container.get_and_return_set_of_objects( + request=[ + ObjectWithRequiredField( + string="string", + ) + ], + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "container/set-of-objects", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=typing.Sequence[ObjectWithRequiredField], direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ObjectWithRequiredField], + parse_obj_as( + type_=typing.List[ObjectWithRequiredField], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_map_prim_to_prim( + self, *, request: typing.Dict[str, str], request_options: typing.Optional[RequestOptions] = None + ) -> typing.Dict[str, str]: + """ + Parameters + ---------- + request : typing.Dict[str, str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Dict[str, str] + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.container.get_and_return_map_prim_to_prim( + request={"string": "string"}, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "container/map-prim-to-prim", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Dict[str, str], + parse_obj_as( + type_=typing.Dict[str, str], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_map_of_prim_to_object( + self, + *, + request: typing.Dict[str, ObjectWithRequiredField], + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Dict[str, ObjectWithRequiredField]: + """ + Parameters + ---------- + request : typing.Dict[str, ObjectWithRequiredField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Dict[str, ObjectWithRequiredField] + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + from seed.types.object import ObjectWithRequiredField + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.container.get_and_return_map_of_prim_to_object( + request={ + "string": ObjectWithRequiredField( + string="string", + ) + }, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "container/map-prim-to-object", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=typing.Dict[str, ObjectWithRequiredField], direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Dict[str, ObjectWithRequiredField], + parse_obj_as( + type_=typing.Dict[str, ObjectWithRequiredField], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_optional( + self, + *, + request: typing.Optional[ObjectWithRequiredField] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[ObjectWithRequiredField]: + """ + Parameters + ---------- + request : typing.Optional[ObjectWithRequiredField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[ObjectWithRequiredField] + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + from seed.types.object import ObjectWithRequiredField + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.container.get_and_return_optional( + request=ObjectWithRequiredField( + string="string", + ), + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "container/opt-objects", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=ObjectWithRequiredField, direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[ObjectWithRequiredField], + parse_obj_as( + type_=typing.Optional[ObjectWithRequiredField], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/enum/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/enum/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/enum/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/enum/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/enum/client.py new file mode 100644 index 00000000000..50e6ca5530f --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/enum/client.py @@ -0,0 +1,127 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ...core.client_wrapper import SyncClientWrapper +from ...types.enum.types.weather_report import WeatherReport +from ...core.request_options import RequestOptions +from ...core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class EnumClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get_and_return_enum( + self, *, request: WeatherReport, request_options: typing.Optional[RequestOptions] = None + ) -> WeatherReport: + """ + Parameters + ---------- + request : WeatherReport + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WeatherReport + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.enum.get_and_return_enum( + request="SUNNY", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "enum", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + WeatherReport, + parse_obj_as( + type_=WeatherReport, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncEnumClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get_and_return_enum( + self, *, request: WeatherReport, request_options: typing.Optional[RequestOptions] = None + ) -> WeatherReport: + """ + Parameters + ---------- + request : WeatherReport + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WeatherReport + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.enum.get_and_return_enum( + request="SUNNY", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "enum", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + WeatherReport, + parse_obj_as( + type_=WeatherReport, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/http_methods/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/http_methods/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/http_methods/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/http_methods/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/http_methods/client.py new file mode 100644 index 00000000000..8cf8adae3b8 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/http_methods/client.py @@ -0,0 +1,701 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ...core.client_wrapper import SyncClientWrapper +from ...core.request_options import RequestOptions +from ...core.jsonable_encoder import jsonable_encoder +from ...core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ...core.api_error import ApiError +from ...types.object.types.object_with_optional_field import ObjectWithOptionalField +import datetime as dt +import uuid +from ...core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class HttpMethodsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def test_get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> str: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.http_methods.test_get( + id="id", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"http-methods/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def test_post( + self, *, string: str, request_options: typing.Optional[RequestOptions] = None + ) -> ObjectWithOptionalField: + """ + Parameters + ---------- + string : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.http_methods.test_post( + string="string", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "http-methods", + method="POST", + json={ + "string": string, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def test_put( + self, id: str, *, string: str, request_options: typing.Optional[RequestOptions] = None + ) -> ObjectWithOptionalField: + """ + Parameters + ---------- + id : str + + string : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.http_methods.test_put( + id="id", + string="string", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"http-methods/{jsonable_encoder(id)}", + method="PUT", + json={ + "string": string, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def test_patch( + self, + id: str, + *, + string: typing.Optional[str] = OMIT, + integer: typing.Optional[int] = OMIT, + long_: typing.Optional[int] = OMIT, + double: typing.Optional[float] = OMIT, + bool_: typing.Optional[bool] = OMIT, + datetime: typing.Optional[dt.datetime] = OMIT, + date: typing.Optional[dt.date] = OMIT, + uuid_: typing.Optional[uuid.UUID] = OMIT, + base_64: typing.Optional[str] = OMIT, + list_: typing.Optional[typing.Sequence[str]] = OMIT, + set_: typing.Optional[typing.Set[str]] = OMIT, + map_: typing.Optional[typing.Dict[int, str]] = OMIT, + bigint: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> ObjectWithOptionalField: + """ + Parameters + ---------- + id : str + + string : typing.Optional[str] + This is a rather long descriptor of this single field in a more complex type. If you ask me I think this is a pretty good description for this field all things considered. + + integer : typing.Optional[int] + + long_ : typing.Optional[int] + + double : typing.Optional[float] + + bool_ : typing.Optional[bool] + + datetime : typing.Optional[dt.datetime] + + date : typing.Optional[dt.date] + + uuid_ : typing.Optional[uuid.UUID] + + base_64 : typing.Optional[str] + + list_ : typing.Optional[typing.Sequence[str]] + + set_ : typing.Optional[typing.Set[str]] + + map_ : typing.Optional[typing.Dict[int, str]] + + bigint : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + import datetime + import uuid + + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.http_methods.test_patch( + id="id", + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"http-methods/{jsonable_encoder(id)}", + method="PATCH", + json={ + "string": string, + "integer": integer, + "long": long_, + "double": double, + "bool": bool_, + "datetime": datetime, + "date": date, + "uuid": uuid_, + "base64": base_64, + "list": list_, + "set": set_, + "map": map_, + "bigint": bigint, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def test_delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> bool: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + bool + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.http_methods.test_delete( + id="id", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"http-methods/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + bool, + parse_obj_as( + type_=bool, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncHttpMethodsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def test_get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> str: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.http_methods.test_get( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"http-methods/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def test_post( + self, *, string: str, request_options: typing.Optional[RequestOptions] = None + ) -> ObjectWithOptionalField: + """ + Parameters + ---------- + string : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.http_methods.test_post( + string="string", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "http-methods", + method="POST", + json={ + "string": string, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def test_put( + self, id: str, *, string: str, request_options: typing.Optional[RequestOptions] = None + ) -> ObjectWithOptionalField: + """ + Parameters + ---------- + id : str + + string : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.http_methods.test_put( + id="id", + string="string", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"http-methods/{jsonable_encoder(id)}", + method="PUT", + json={ + "string": string, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def test_patch( + self, + id: str, + *, + string: typing.Optional[str] = OMIT, + integer: typing.Optional[int] = OMIT, + long_: typing.Optional[int] = OMIT, + double: typing.Optional[float] = OMIT, + bool_: typing.Optional[bool] = OMIT, + datetime: typing.Optional[dt.datetime] = OMIT, + date: typing.Optional[dt.date] = OMIT, + uuid_: typing.Optional[uuid.UUID] = OMIT, + base_64: typing.Optional[str] = OMIT, + list_: typing.Optional[typing.Sequence[str]] = OMIT, + set_: typing.Optional[typing.Set[str]] = OMIT, + map_: typing.Optional[typing.Dict[int, str]] = OMIT, + bigint: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> ObjectWithOptionalField: + """ + Parameters + ---------- + id : str + + string : typing.Optional[str] + This is a rather long descriptor of this single field in a more complex type. If you ask me I think this is a pretty good description for this field all things considered. + + integer : typing.Optional[int] + + long_ : typing.Optional[int] + + double : typing.Optional[float] + + bool_ : typing.Optional[bool] + + datetime : typing.Optional[dt.datetime] + + date : typing.Optional[dt.date] + + uuid_ : typing.Optional[uuid.UUID] + + base_64 : typing.Optional[str] + + list_ : typing.Optional[typing.Sequence[str]] + + set_ : typing.Optional[typing.Set[str]] + + map_ : typing.Optional[typing.Dict[int, str]] + + bigint : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + import asyncio + import datetime + import uuid + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.http_methods.test_patch( + id="id", + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"http-methods/{jsonable_encoder(id)}", + method="PATCH", + json={ + "string": string, + "integer": integer, + "long": long_, + "double": double, + "bool": bool_, + "datetime": datetime, + "date": date, + "uuid": uuid_, + "base64": base_64, + "list": list_, + "set": set_, + "map": map_, + "bigint": bigint, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def test_delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> bool: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + bool + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.http_methods.test_delete( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"http-methods/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + bool, + parse_obj_as( + type_=bool, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/client.py new file mode 100644 index 00000000000..53ac56a9f1e --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/client.py @@ -0,0 +1,1083 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ...core.client_wrapper import SyncClientWrapper +import datetime as dt +import uuid +from ...core.request_options import RequestOptions +from ...types.object.types.object_with_optional_field import ObjectWithOptionalField +from ...core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ...core.api_error import ApiError +from ...types.object.types.object_with_required_field import ObjectWithRequiredField +from ...types.object.types.object_with_map_of_map import ObjectWithMapOfMap +from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField +from ...core.serialization import convert_and_respect_annotation_metadata +from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField +from ...core.jsonable_encoder import jsonable_encoder +from ...core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ObjectClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get_and_return_with_optional_field( + self, + *, + string: typing.Optional[str] = OMIT, + integer: typing.Optional[int] = OMIT, + long_: typing.Optional[int] = OMIT, + double: typing.Optional[float] = OMIT, + bool_: typing.Optional[bool] = OMIT, + datetime: typing.Optional[dt.datetime] = OMIT, + date: typing.Optional[dt.date] = OMIT, + uuid_: typing.Optional[uuid.UUID] = OMIT, + base_64: typing.Optional[str] = OMIT, + list_: typing.Optional[typing.Sequence[str]] = OMIT, + set_: typing.Optional[typing.Set[str]] = OMIT, + map_: typing.Optional[typing.Dict[int, str]] = OMIT, + bigint: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> ObjectWithOptionalField: + """ + Parameters + ---------- + string : typing.Optional[str] + This is a rather long descriptor of this single field in a more complex type. If you ask me I think this is a pretty good description for this field all things considered. + + integer : typing.Optional[int] + + long_ : typing.Optional[int] + + double : typing.Optional[float] + + bool_ : typing.Optional[bool] + + datetime : typing.Optional[dt.datetime] + + date : typing.Optional[dt.date] + + uuid_ : typing.Optional[uuid.UUID] + + base_64 : typing.Optional[str] + + list_ : typing.Optional[typing.Sequence[str]] + + set_ : typing.Optional[typing.Set[str]] + + map_ : typing.Optional[typing.Dict[int, str]] + + bigint : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + import datetime + import uuid + + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_with_optional_field( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-with-optional-field", + method="POST", + json={ + "string": string, + "integer": integer, + "long": long_, + "double": double, + "bool": bool_, + "datetime": datetime, + "date": date, + "uuid": uuid_, + "base64": base_64, + "list": list_, + "set": set_, + "map": map_, + "bigint": bigint, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_with_required_field( + self, *, string: str, request_options: typing.Optional[RequestOptions] = None + ) -> ObjectWithRequiredField: + """ + Parameters + ---------- + string : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithRequiredField + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_with_required_field( + string="string", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-with-required-field", + method="POST", + json={ + "string": string, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithRequiredField, + parse_obj_as( + type_=ObjectWithRequiredField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_with_map_of_map( + self, *, map_: typing.Dict[str, typing.Dict[str, str]], request_options: typing.Optional[RequestOptions] = None + ) -> ObjectWithMapOfMap: + """ + Parameters + ---------- + map_ : typing.Dict[str, typing.Dict[str, str]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithMapOfMap + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_with_map_of_map( + map_={"map": {"map": "map"}}, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-with-map-of-map", + method="POST", + json={ + "map": map_, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithMapOfMap, + parse_obj_as( + type_=ObjectWithMapOfMap, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_nested_with_optional_field( + self, + *, + string: typing.Optional[str] = OMIT, + nested_object: typing.Optional[ObjectWithOptionalField] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> NestedObjectWithOptionalField: + """ + Parameters + ---------- + string : typing.Optional[str] + + nested_object : typing.Optional[ObjectWithOptionalField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + NestedObjectWithOptionalField + + Examples + -------- + import datetime + import uuid + + from seed import SeedExhaustive + from seed.types.object import ObjectWithOptionalField + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_nested_with_optional_field( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-nested-with-optional-field", + method="POST", + json={ + "string": string, + "NestedObject": convert_and_respect_annotation_metadata( + object_=nested_object, annotation=ObjectWithOptionalField, direction="write" + ), + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + NestedObjectWithOptionalField, + parse_obj_as( + type_=NestedObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_nested_with_required_field( + self, + string_: str, + *, + string: str, + nested_object: ObjectWithOptionalField, + request_options: typing.Optional[RequestOptions] = None, + ) -> NestedObjectWithRequiredField: + """ + Parameters + ---------- + string_ : str + + string : str + + nested_object : ObjectWithOptionalField + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + NestedObjectWithRequiredField + + Examples + -------- + import datetime + import uuid + + from seed import SeedExhaustive + from seed.types.object import ObjectWithOptionalField + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_nested_with_required_field( + string_="string", + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"object/get-and-return-nested-with-required-field/{jsonable_encoder(string_)}", + method="POST", + json={ + "string": string, + "NestedObject": convert_and_respect_annotation_metadata( + object_=nested_object, annotation=ObjectWithOptionalField, direction="write" + ), + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + NestedObjectWithRequiredField, + parse_obj_as( + type_=NestedObjectWithRequiredField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_nested_with_required_field_as_list( + self, + *, + request: typing.Sequence[NestedObjectWithRequiredField], + request_options: typing.Optional[RequestOptions] = None, + ) -> NestedObjectWithRequiredField: + """ + Parameters + ---------- + request : typing.Sequence[NestedObjectWithRequiredField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + NestedObjectWithRequiredField + + Examples + -------- + import datetime + import uuid + + from seed import SeedExhaustive + from seed.types.object import ( + NestedObjectWithRequiredField, + ObjectWithOptionalField, + ) + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_nested_with_required_field_as_list( + request=[ + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ), + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ), + ], + ) + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-nested-with-required-field-list", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=typing.Sequence[NestedObjectWithRequiredField], direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + NestedObjectWithRequiredField, + parse_obj_as( + type_=NestedObjectWithRequiredField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncObjectClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get_and_return_with_optional_field( + self, + *, + string: typing.Optional[str] = OMIT, + integer: typing.Optional[int] = OMIT, + long_: typing.Optional[int] = OMIT, + double: typing.Optional[float] = OMIT, + bool_: typing.Optional[bool] = OMIT, + datetime: typing.Optional[dt.datetime] = OMIT, + date: typing.Optional[dt.date] = OMIT, + uuid_: typing.Optional[uuid.UUID] = OMIT, + base_64: typing.Optional[str] = OMIT, + list_: typing.Optional[typing.Sequence[str]] = OMIT, + set_: typing.Optional[typing.Set[str]] = OMIT, + map_: typing.Optional[typing.Dict[int, str]] = OMIT, + bigint: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> ObjectWithOptionalField: + """ + Parameters + ---------- + string : typing.Optional[str] + This is a rather long descriptor of this single field in a more complex type. If you ask me I think this is a pretty good description for this field all things considered. + + integer : typing.Optional[int] + + long_ : typing.Optional[int] + + double : typing.Optional[float] + + bool_ : typing.Optional[bool] + + datetime : typing.Optional[dt.datetime] + + date : typing.Optional[dt.date] + + uuid_ : typing.Optional[uuid.UUID] + + base_64 : typing.Optional[str] + + list_ : typing.Optional[typing.Sequence[str]] + + set_ : typing.Optional[typing.Set[str]] + + map_ : typing.Optional[typing.Dict[int, str]] + + bigint : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + import asyncio + import datetime + import uuid + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_with_optional_field( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-with-optional-field", + method="POST", + json={ + "string": string, + "integer": integer, + "long": long_, + "double": double, + "bool": bool_, + "datetime": datetime, + "date": date, + "uuid": uuid_, + "base64": base_64, + "list": list_, + "set": set_, + "map": map_, + "bigint": bigint, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_with_required_field( + self, *, string: str, request_options: typing.Optional[RequestOptions] = None + ) -> ObjectWithRequiredField: + """ + Parameters + ---------- + string : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithRequiredField + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_with_required_field( + string="string", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-with-required-field", + method="POST", + json={ + "string": string, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithRequiredField, + parse_obj_as( + type_=ObjectWithRequiredField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_with_map_of_map( + self, *, map_: typing.Dict[str, typing.Dict[str, str]], request_options: typing.Optional[RequestOptions] = None + ) -> ObjectWithMapOfMap: + """ + Parameters + ---------- + map_ : typing.Dict[str, typing.Dict[str, str]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithMapOfMap + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_with_map_of_map( + map_={"map": {"map": "map"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-with-map-of-map", + method="POST", + json={ + "map": map_, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithMapOfMap, + parse_obj_as( + type_=ObjectWithMapOfMap, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_nested_with_optional_field( + self, + *, + string: typing.Optional[str] = OMIT, + nested_object: typing.Optional[ObjectWithOptionalField] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> NestedObjectWithOptionalField: + """ + Parameters + ---------- + string : typing.Optional[str] + + nested_object : typing.Optional[ObjectWithOptionalField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + NestedObjectWithOptionalField + + Examples + -------- + import asyncio + import datetime + import uuid + + from seed import AsyncSeedExhaustive + from seed.types.object import ObjectWithOptionalField + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_nested_with_optional_field( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-nested-with-optional-field", + method="POST", + json={ + "string": string, + "NestedObject": convert_and_respect_annotation_metadata( + object_=nested_object, annotation=ObjectWithOptionalField, direction="write" + ), + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + NestedObjectWithOptionalField, + parse_obj_as( + type_=NestedObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_nested_with_required_field( + self, + string_: str, + *, + string: str, + nested_object: ObjectWithOptionalField, + request_options: typing.Optional[RequestOptions] = None, + ) -> NestedObjectWithRequiredField: + """ + Parameters + ---------- + string_ : str + + string : str + + nested_object : ObjectWithOptionalField + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + NestedObjectWithRequiredField + + Examples + -------- + import asyncio + import datetime + import uuid + + from seed import AsyncSeedExhaustive + from seed.types.object import ObjectWithOptionalField + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_nested_with_required_field( + string_="string", + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"object/get-and-return-nested-with-required-field/{jsonable_encoder(string_)}", + method="POST", + json={ + "string": string, + "NestedObject": convert_and_respect_annotation_metadata( + object_=nested_object, annotation=ObjectWithOptionalField, direction="write" + ), + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + NestedObjectWithRequiredField, + parse_obj_as( + type_=NestedObjectWithRequiredField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_nested_with_required_field_as_list( + self, + *, + request: typing.Sequence[NestedObjectWithRequiredField], + request_options: typing.Optional[RequestOptions] = None, + ) -> NestedObjectWithRequiredField: + """ + Parameters + ---------- + request : typing.Sequence[NestedObjectWithRequiredField] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + NestedObjectWithRequiredField + + Examples + -------- + import asyncio + import datetime + import uuid + + from seed import AsyncSeedExhaustive + from seed.types.object import ( + NestedObjectWithRequiredField, + ObjectWithOptionalField, + ) + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_nested_with_required_field_as_list( + request=[ + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ), + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ), + ], + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-nested-with-required-field-list", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=typing.Sequence[NestedObjectWithRequiredField], direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + NestedObjectWithRequiredField, + parse_obj_as( + type_=NestedObjectWithRequiredField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/params/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/params/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/params/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/params/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/params/client.py new file mode 100644 index 00000000000..677c2c61aee --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/params/client.py @@ -0,0 +1,561 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ...core.client_wrapper import SyncClientWrapper +from ...core.request_options import RequestOptions +from ...core.jsonable_encoder import jsonable_encoder +from ...core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ParamsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get_with_path(self, param: str, *, request_options: typing.Optional[RequestOptions] = None) -> str: + """ + GET with path param + + Parameters + ---------- + param : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.params.get_with_path( + param="param", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"params/path/{jsonable_encoder(param)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_with_query( + self, *, query: str, number: int, request_options: typing.Optional[RequestOptions] = None + ) -> None: + """ + GET with query param + + Parameters + ---------- + query : str + + number : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.params.get_with_query( + query="query", + number=1, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "params", + method="GET", + params={ + "query": query, + "number": number, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_with_allow_multiple_query( + self, + *, + query: typing.Union[str, typing.Sequence[str]], + numer: typing.Union[int, typing.Sequence[int]], + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + GET with multiple of same query param + + Parameters + ---------- + query : typing.Union[str, typing.Sequence[str]] + + numer : typing.Union[int, typing.Sequence[int]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.params.get_with_allow_multiple_query( + query="query", + numer=1, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "params", + method="GET", + params={ + "query": query, + "numer": numer, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_with_path_and_query( + self, param: str, *, query: str, request_options: typing.Optional[RequestOptions] = None + ) -> None: + """ + GET with path and query params + + Parameters + ---------- + param : str + + query : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.params.get_with_path_and_query( + param="param", + query="query", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"params/path-query/{jsonable_encoder(param)}", + method="GET", + params={ + "query": query, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def modify_with_path( + self, param: str, *, request: str, request_options: typing.Optional[RequestOptions] = None + ) -> str: + """ + PUT to update with path param + + Parameters + ---------- + param : str + + request : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.params.modify_with_path( + param="param", + request="string", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"params/path/{jsonable_encoder(param)}", + method="PUT", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncParamsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get_with_path(self, param: str, *, request_options: typing.Optional[RequestOptions] = None) -> str: + """ + GET with path param + + Parameters + ---------- + param : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.params.get_with_path( + param="param", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"params/path/{jsonable_encoder(param)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_with_query( + self, *, query: str, number: int, request_options: typing.Optional[RequestOptions] = None + ) -> None: + """ + GET with query param + + Parameters + ---------- + query : str + + number : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.params.get_with_query( + query="query", + number=1, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "params", + method="GET", + params={ + "query": query, + "number": number, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_with_allow_multiple_query( + self, + *, + query: typing.Union[str, typing.Sequence[str]], + numer: typing.Union[int, typing.Sequence[int]], + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + GET with multiple of same query param + + Parameters + ---------- + query : typing.Union[str, typing.Sequence[str]] + + numer : typing.Union[int, typing.Sequence[int]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.params.get_with_allow_multiple_query( + query="query", + numer=1, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "params", + method="GET", + params={ + "query": query, + "numer": numer, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_with_path_and_query( + self, param: str, *, query: str, request_options: typing.Optional[RequestOptions] = None + ) -> None: + """ + GET with path and query params + + Parameters + ---------- + param : str + + query : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.params.get_with_path_and_query( + param="param", + query="query", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"params/path-query/{jsonable_encoder(param)}", + method="GET", + params={ + "query": query, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def modify_with_path( + self, param: str, *, request: str, request_options: typing.Optional[RequestOptions] = None + ) -> str: + """ + PUT to update with path param + + Parameters + ---------- + param : str + + request : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.params.modify_with_path( + param="param", + request="string", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"params/path/{jsonable_encoder(param)}", + method="PUT", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/primitive/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/primitive/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/primitive/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/primitive/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/primitive/client.py new file mode 100644 index 00000000000..5e18f184482 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/primitive/client.py @@ -0,0 +1,969 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ...core.client_wrapper import SyncClientWrapper +from ...core.request_options import RequestOptions +from ...core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ...core.api_error import ApiError +import datetime as dt +import uuid +from ...core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class PrimitiveClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get_and_return_string(self, *, request: str, request_options: typing.Optional[RequestOptions] = None) -> str: + """ + Parameters + ---------- + request : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.primitive.get_and_return_string( + request="string", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "primitive/string", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_int(self, *, request: int, request_options: typing.Optional[RequestOptions] = None) -> int: + """ + Parameters + ---------- + request : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + int + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.primitive.get_and_return_int( + request=1, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "primitive/integer", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + int, + parse_obj_as( + type_=int, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_long(self, *, request: int, request_options: typing.Optional[RequestOptions] = None) -> int: + """ + Parameters + ---------- + request : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + int + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.primitive.get_and_return_long( + request=1000000, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "primitive/long", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + int, + parse_obj_as( + type_=int, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_double( + self, *, request: float, request_options: typing.Optional[RequestOptions] = None + ) -> float: + """ + Parameters + ---------- + request : float + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + float + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.primitive.get_and_return_double( + request=1.1, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "primitive/double", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + float, + parse_obj_as( + type_=float, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_bool(self, *, request: bool, request_options: typing.Optional[RequestOptions] = None) -> bool: + """ + Parameters + ---------- + request : bool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + bool + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.primitive.get_and_return_bool( + request=True, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "primitive/boolean", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + bool, + parse_obj_as( + type_=bool, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_datetime( + self, *, request: dt.datetime, request_options: typing.Optional[RequestOptions] = None + ) -> dt.datetime: + """ + Parameters + ---------- + request : dt.datetime + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + dt.datetime + + Examples + -------- + import datetime + + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.primitive.get_and_return_datetime( + request=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "primitive/datetime", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + dt.datetime, + parse_obj_as( + type_=dt.datetime, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_date( + self, *, request: dt.date, request_options: typing.Optional[RequestOptions] = None + ) -> dt.date: + """ + Parameters + ---------- + request : dt.date + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + dt.date + + Examples + -------- + import datetime + + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.primitive.get_and_return_date( + request=datetime.date.fromisoformat( + "2023-01-15", + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "primitive/date", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + dt.date, + parse_obj_as( + type_=dt.date, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_uuid( + self, *, request: uuid.UUID, request_options: typing.Optional[RequestOptions] = None + ) -> uuid.UUID: + """ + Parameters + ---------- + request : uuid.UUID + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + uuid.UUID + + Examples + -------- + import uuid + + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.primitive.get_and_return_uuid( + request=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "primitive/uuid", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + uuid.UUID, + parse_obj_as( + type_=uuid.UUID, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_and_return_base_64(self, *, request: str, request_options: typing.Optional[RequestOptions] = None) -> str: + """ + Parameters + ---------- + request : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.primitive.get_and_return_base_64( + request="SGVsbG8gd29ybGQh", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "primitive/base64", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncPrimitiveClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get_and_return_string( + self, *, request: str, request_options: typing.Optional[RequestOptions] = None + ) -> str: + """ + Parameters + ---------- + request : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.primitive.get_and_return_string( + request="string", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "primitive/string", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_int(self, *, request: int, request_options: typing.Optional[RequestOptions] = None) -> int: + """ + Parameters + ---------- + request : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + int + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.primitive.get_and_return_int( + request=1, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "primitive/integer", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + int, + parse_obj_as( + type_=int, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_long( + self, *, request: int, request_options: typing.Optional[RequestOptions] = None + ) -> int: + """ + Parameters + ---------- + request : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + int + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.primitive.get_and_return_long( + request=1000000, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "primitive/long", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + int, + parse_obj_as( + type_=int, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_double( + self, *, request: float, request_options: typing.Optional[RequestOptions] = None + ) -> float: + """ + Parameters + ---------- + request : float + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + float + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.primitive.get_and_return_double( + request=1.1, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "primitive/double", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + float, + parse_obj_as( + type_=float, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_bool( + self, *, request: bool, request_options: typing.Optional[RequestOptions] = None + ) -> bool: + """ + Parameters + ---------- + request : bool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + bool + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.primitive.get_and_return_bool( + request=True, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "primitive/boolean", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + bool, + parse_obj_as( + type_=bool, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_datetime( + self, *, request: dt.datetime, request_options: typing.Optional[RequestOptions] = None + ) -> dt.datetime: + """ + Parameters + ---------- + request : dt.datetime + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + dt.datetime + + Examples + -------- + import asyncio + import datetime + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.primitive.get_and_return_datetime( + request=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "primitive/datetime", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + dt.datetime, + parse_obj_as( + type_=dt.datetime, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_date( + self, *, request: dt.date, request_options: typing.Optional[RequestOptions] = None + ) -> dt.date: + """ + Parameters + ---------- + request : dt.date + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + dt.date + + Examples + -------- + import asyncio + import datetime + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.primitive.get_and_return_date( + request=datetime.date.fromisoformat( + "2023-01-15", + ), + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "primitive/date", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + dt.date, + parse_obj_as( + type_=dt.date, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_uuid( + self, *, request: uuid.UUID, request_options: typing.Optional[RequestOptions] = None + ) -> uuid.UUID: + """ + Parameters + ---------- + request : uuid.UUID + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + uuid.UUID + + Examples + -------- + import asyncio + import uuid + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.primitive.get_and_return_uuid( + request=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "primitive/uuid", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + uuid.UUID, + parse_obj_as( + type_=uuid.UUID, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_and_return_base_64( + self, *, request: str, request_options: typing.Optional[RequestOptions] = None + ) -> str: + """ + Parameters + ---------- + request : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.primitive.get_and_return_base_64( + request="SGVsbG8gd29ybGQh", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "primitive/base64", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/union/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/union/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/union/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/union/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/union/client.py new file mode 100644 index 00000000000..f469c0814a8 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/union/client.py @@ -0,0 +1,136 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ...core.client_wrapper import SyncClientWrapper +from ...types.union.types.animal import Animal +from ...core.request_options import RequestOptions +from ...core.serialization import convert_and_respect_annotation_metadata +from ...core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class UnionClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get_and_return_union( + self, *, request: Animal, request_options: typing.Optional[RequestOptions] = None + ) -> Animal: + """ + Parameters + ---------- + request : Animal + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Animal + + Examples + -------- + from seed import SeedExhaustive + from seed.types.union import Animal_Dog + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.union.get_and_return_union( + request=Animal_Dog( + name="name", + likes_to_woof=True, + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "union", + method="POST", + json=convert_and_respect_annotation_metadata(object_=request, annotation=Animal, direction="write"), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Animal, + parse_obj_as( + type_=Animal, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncUnionClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get_and_return_union( + self, *, request: Animal, request_options: typing.Optional[RequestOptions] = None + ) -> Animal: + """ + Parameters + ---------- + request : Animal + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Animal + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + from seed.types.union import Animal_Dog + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.union.get_and_return_union( + request=Animal_Dog( + name="name", + likes_to_woof=True, + ), + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "union", + method="POST", + json=convert_and_respect_annotation_metadata(object_=request, annotation=Animal, direction="write"), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Animal, + parse_obj_as( + type_=Animal, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/__init__.py new file mode 100644 index 00000000000..57de0a862e9 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/__init__.py @@ -0,0 +1,6 @@ +# This file was auto-generated by Fern from our API Definition. + +from .types import BadObjectRequestInfo +from .errors import BadRequestBody + +__all__ = ["BadObjectRequestInfo", "BadRequestBody"] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/errors/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/errors/__init__.py new file mode 100644 index 00000000000..04eaf8e383b --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/errors/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .bad_request_body import BadRequestBody + +__all__ = ["BadRequestBody"] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/errors/bad_request_body.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/errors/bad_request_body.py new file mode 100644 index 00000000000..f8518e355d0 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/errors/bad_request_body.py @@ -0,0 +1,9 @@ +# This file was auto-generated by Fern from our API Definition. + +from ...core.api_error import ApiError +from ..types.bad_object_request_info import BadObjectRequestInfo + + +class BadRequestBody(ApiError): + def __init__(self, body: BadObjectRequestInfo): + super().__init__(status_code=400, body=body) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/types/__init__.py new file mode 100644 index 00000000000..b6788a57056 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/types/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .bad_object_request_info import BadObjectRequestInfo + +__all__ = ["BadObjectRequestInfo"] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/types/bad_object_request_info.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/types/bad_object_request_info.py new file mode 100644 index 00000000000..edcb3da4b0d --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/general_errors/types/bad_object_request_info.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +from ...core.pydantic_utilities import UniversalBaseModel +import typing +import pydantic + + +class BadObjectRequestInfo(UniversalBaseModel): + message: str + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/inlined_requests/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/inlined_requests/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/inlined_requests/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/inlined_requests/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/inlined_requests/client.py new file mode 100644 index 00000000000..096f1dc8f93 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/inlined_requests/client.py @@ -0,0 +1,235 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ..core.client_wrapper import SyncClientWrapper +from ..types.object.types.object_with_optional_field import ObjectWithOptionalField +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.pydantic_utilities import parse_obj_as +from ..general_errors.errors.bad_request_body import BadRequestBody +from ..general_errors.types.bad_object_request_info import BadObjectRequestInfo +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class InlinedRequestsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def post_with_object_bodyand_response( + self, + *, + string: str, + integer: int, + nested_object: ObjectWithOptionalField, + request_options: typing.Optional[RequestOptions] = None, + ) -> ObjectWithOptionalField: + """ + POST with custom object in request body, response is an object + + Parameters + ---------- + string : str + + integer : int + + nested_object : ObjectWithOptionalField + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + import datetime + import uuid + + from seed import SeedExhaustive + from seed.types.object import ObjectWithOptionalField + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.inlined_requests.post_with_object_bodyand_response( + string="string", + integer=1, + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "req-bodies/object", + method="POST", + json={ + "string": string, + "integer": integer, + "NestedObject": convert_and_respect_annotation_metadata( + object_=nested_object, annotation=ObjectWithOptionalField, direction="write" + ), + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 400: + raise BadRequestBody( + typing.cast( + BadObjectRequestInfo, + parse_obj_as( + type_=BadObjectRequestInfo, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncInlinedRequestsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def post_with_object_bodyand_response( + self, + *, + string: str, + integer: int, + nested_object: ObjectWithOptionalField, + request_options: typing.Optional[RequestOptions] = None, + ) -> ObjectWithOptionalField: + """ + POST with custom object in request body, response is an object + + Parameters + ---------- + string : str + + integer : int + + nested_object : ObjectWithOptionalField + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + import asyncio + import datetime + import uuid + + from seed import AsyncSeedExhaustive + from seed.types.object import ObjectWithOptionalField + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.inlined_requests.post_with_object_bodyand_response( + string="string", + integer=1, + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + date=datetime.date.fromisoformat( + "2023-01-15", + ), + uuid_=uuid.UUID( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "req-bodies/object", + method="POST", + json={ + "string": string, + "integer": integer, + "NestedObject": convert_and_respect_annotation_metadata( + object_=nested_object, annotation=ObjectWithOptionalField, direction="write" + ), + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 400: + raise BadRequestBody( + typing.cast( + BadObjectRequestInfo, + parse_obj_as( + type_=BadObjectRequestInfo, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_auth/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_auth/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_auth/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_auth/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_auth/client.py new file mode 100644 index 00000000000..886ef5803e9 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_auth/client.py @@ -0,0 +1,152 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ..core.client_wrapper import SyncClientWrapper +from ..core.request_options import RequestOptions +from ..core.pydantic_utilities import parse_obj_as +from ..general_errors.errors.bad_request_body import BadRequestBody +from ..general_errors.types.bad_object_request_info import BadObjectRequestInfo +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class NoAuthClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def post_with_no_auth( + self, *, request: typing.Optional[typing.Any] = None, request_options: typing.Optional[RequestOptions] = None + ) -> bool: + """ + POST request with no auth + + Parameters + ---------- + request : typing.Optional[typing.Any] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + bool + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.no_auth.post_with_no_auth( + request={"key": "value"}, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "no-auth", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + bool, + parse_obj_as( + type_=bool, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 400: + raise BadRequestBody( + typing.cast( + BadObjectRequestInfo, + parse_obj_as( + type_=BadObjectRequestInfo, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncNoAuthClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def post_with_no_auth( + self, *, request: typing.Optional[typing.Any] = None, request_options: typing.Optional[RequestOptions] = None + ) -> bool: + """ + POST request with no auth + + Parameters + ---------- + request : typing.Optional[typing.Any] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + bool + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.no_auth.post_with_no_auth( + request={"key": "value"}, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "no-auth", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + bool, + parse_obj_as( + type_=bool, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 400: + raise BadRequestBody( + typing.cast( + BadObjectRequestInfo, + parse_obj_as( + type_=BadObjectRequestInfo, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_req_body/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_req_body/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_req_body/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_req_body/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_req_body/client.py new file mode 100644 index 00000000000..f6408c8c391 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/no_req_body/client.py @@ -0,0 +1,200 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.client_wrapper import SyncClientWrapper +import typing +from ..core.request_options import RequestOptions +from ..types.object.types.object_with_optional_field import ObjectWithOptionalField +from ..core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper + + +class NoReqBodyClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get_with_no_request_body( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> ObjectWithOptionalField: + """ + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.no_req_body.get_with_no_request_body() + """ + _response = self._client_wrapper.httpx_client.request( + "no-req-body", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def post_with_no_request_body(self, *, request_options: typing.Optional[RequestOptions] = None) -> str: + """ + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.no_req_body.post_with_no_request_body() + """ + _response = self._client_wrapper.httpx_client.request( + "no-req-body", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncNoReqBodyClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get_with_no_request_body( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> ObjectWithOptionalField: + """ + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ObjectWithOptionalField + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.no_req_body.get_with_no_request_body() + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "no-req-body", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ObjectWithOptionalField, + parse_obj_as( + type_=ObjectWithOptionalField, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def post_with_no_request_body(self, *, request_options: typing.Optional[RequestOptions] = None) -> str: + """ + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + str + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.no_req_body.post_with_no_request_body() + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "no-req-body", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/py.typed b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/py.typed new file mode 100644 index 00000000000..e69de29bb2d diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/req_with_headers/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/req_with_headers/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/req_with_headers/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/req_with_headers/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/req_with_headers/client.py new file mode 100644 index 00000000000..98e03a9b5fe --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/req_with_headers/client.py @@ -0,0 +1,143 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ..core.client_wrapper import SyncClientWrapper +from ..core.request_options import RequestOptions +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ReqWithHeadersClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get_with_custom_header( + self, + *, + x_test_service_header: str, + x_test_endpoint_header: str, + request: str, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Parameters + ---------- + x_test_service_header : str + + x_test_endpoint_header : str + + request : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.req_with_headers.get_with_custom_header( + x_test_service_header="X-TEST-SERVICE-HEADER", + x_test_endpoint_header="X-TEST-ENDPOINT-HEADER", + request="string", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "test-headers/custom-header", + method="POST", + json=request, + headers={ + "X-TEST-SERVICE-HEADER": str(x_test_service_header) if x_test_service_header is not None else None, + "X-TEST-ENDPOINT-HEADER": str(x_test_endpoint_header) if x_test_endpoint_header is not None else None, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncReqWithHeadersClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get_with_custom_header( + self, + *, + x_test_service_header: str, + x_test_endpoint_header: str, + request: str, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Parameters + ---------- + x_test_service_header : str + + x_test_endpoint_header : str + + request : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.req_with_headers.get_with_custom_header( + x_test_service_header="X-TEST-SERVICE-HEADER", + x_test_endpoint_header="X-TEST-ENDPOINT-HEADER", + request="string", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "test-headers/custom-header", + method="POST", + json=request, + headers={ + "X-TEST-SERVICE-HEADER": str(x_test_service_header) if x_test_service_header is not None else None, + "X-TEST-ENDPOINT-HEADER": str(x_test_endpoint_header) if x_test_endpoint_header is not None else None, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/__init__.py new file mode 100644 index 00000000000..e7a49db5142 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/__init__.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from . import enum, object, union +from .enum import ErrorWithEnumBody, WeatherReport +from .object import ( + DoubleOptional, + NestedObjectWithOptionalField, + NestedObjectWithOptionalFieldError, + NestedObjectWithRequiredField, + NestedObjectWithRequiredFieldError, + ObjectWithMapOfMap, + ObjectWithOptionalField, + ObjectWithOptionalFieldError, + ObjectWithRequiredField, + ObjectWithRequiredFieldError, + OptionalAlias, +) +from .union import Animal, Animal_Cat, Animal_Dog, Cat, Dog, ErrorWithUnionBody + +__all__ = [ + "Animal", + "Animal_Cat", + "Animal_Dog", + "Cat", + "Dog", + "DoubleOptional", + "ErrorWithEnumBody", + "ErrorWithUnionBody", + "NestedObjectWithOptionalField", + "NestedObjectWithOptionalFieldError", + "NestedObjectWithRequiredField", + "NestedObjectWithRequiredFieldError", + "ObjectWithMapOfMap", + "ObjectWithOptionalField", + "ObjectWithOptionalFieldError", + "ObjectWithRequiredField", + "ObjectWithRequiredFieldError", + "OptionalAlias", + "WeatherReport", + "enum", + "object", + "union", +] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/__init__.py new file mode 100644 index 00000000000..b1c48999a72 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/__init__.py @@ -0,0 +1,6 @@ +# This file was auto-generated by Fern from our API Definition. + +from .types import WeatherReport +from .errors import ErrorWithEnumBody + +__all__ = ["ErrorWithEnumBody", "WeatherReport"] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/errors/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/errors/__init__.py new file mode 100644 index 00000000000..f5945e36d9d --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/errors/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .error_with_enum_body import ErrorWithEnumBody + +__all__ = ["ErrorWithEnumBody"] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/errors/error_with_enum_body.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/errors/error_with_enum_body.py new file mode 100644 index 00000000000..dfdc65ac0a2 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/errors/error_with_enum_body.py @@ -0,0 +1,9 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.api_error import ApiError +from ..types.weather_report import WeatherReport + + +class ErrorWithEnumBody(ApiError): + def __init__(self, body: WeatherReport): + super().__init__(status_code=400, body=body) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/types/__init__.py new file mode 100644 index 00000000000..7a47d1fefc6 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/types/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .weather_report import WeatherReport + +__all__ = ["WeatherReport"] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/types/weather_report.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/types/weather_report.py new file mode 100644 index 00000000000..2d54965dc22 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/enum/types/weather_report.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WeatherReport = typing.Union[typing.Literal["SUNNY", "CLOUDY", "RAINING", "SNOWING"], typing.Any] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/__init__.py new file mode 100644 index 00000000000..e3a774b5a05 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/__init__.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from .types import ( + DoubleOptional, + NestedObjectWithOptionalField, + NestedObjectWithRequiredField, + ObjectWithMapOfMap, + ObjectWithOptionalField, + ObjectWithRequiredField, + OptionalAlias, +) +from .errors import ( + NestedObjectWithOptionalFieldError, + NestedObjectWithRequiredFieldError, + ObjectWithOptionalFieldError, + ObjectWithRequiredFieldError, +) + +__all__ = [ + "DoubleOptional", + "NestedObjectWithOptionalField", + "NestedObjectWithOptionalFieldError", + "NestedObjectWithRequiredField", + "NestedObjectWithRequiredFieldError", + "ObjectWithMapOfMap", + "ObjectWithOptionalField", + "ObjectWithOptionalFieldError", + "ObjectWithRequiredField", + "ObjectWithRequiredFieldError", + "OptionalAlias", +] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/__init__.py new file mode 100644 index 00000000000..7e7e4c63aa8 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/__init__.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +from .nested_object_with_optional_field_error import NestedObjectWithOptionalFieldError +from .nested_object_with_required_field_error import NestedObjectWithRequiredFieldError +from .object_with_optional_field_error import ObjectWithOptionalFieldError +from .object_with_required_field_error import ObjectWithRequiredFieldError + +__all__ = [ + "NestedObjectWithOptionalFieldError", + "NestedObjectWithRequiredFieldError", + "ObjectWithOptionalFieldError", + "ObjectWithRequiredFieldError", +] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/nested_object_with_optional_field_error.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/nested_object_with_optional_field_error.py new file mode 100644 index 00000000000..a3886c45b34 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/nested_object_with_optional_field_error.py @@ -0,0 +1,9 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.api_error import ApiError +from ..types.nested_object_with_optional_field import NestedObjectWithOptionalField + + +class NestedObjectWithOptionalFieldError(ApiError): + def __init__(self, body: NestedObjectWithOptionalField): + super().__init__(status_code=400, body=body) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/nested_object_with_required_field_error.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/nested_object_with_required_field_error.py new file mode 100644 index 00000000000..3b6b788d492 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/nested_object_with_required_field_error.py @@ -0,0 +1,9 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.api_error import ApiError +from ..types.nested_object_with_required_field import NestedObjectWithRequiredField + + +class NestedObjectWithRequiredFieldError(ApiError): + def __init__(self, body: NestedObjectWithRequiredField): + super().__init__(status_code=400, body=body) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/object_with_optional_field_error.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/object_with_optional_field_error.py new file mode 100644 index 00000000000..3652a448b6e --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/object_with_optional_field_error.py @@ -0,0 +1,9 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.api_error import ApiError +from ..types.object_with_optional_field import ObjectWithOptionalField + + +class ObjectWithOptionalFieldError(ApiError): + def __init__(self, body: ObjectWithOptionalField): + super().__init__(status_code=400, body=body) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/object_with_required_field_error.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/object_with_required_field_error.py new file mode 100644 index 00000000000..ee17778fd26 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/errors/object_with_required_field_error.py @@ -0,0 +1,9 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.api_error import ApiError +from ..types.object_with_required_field import ObjectWithRequiredField + + +class ObjectWithRequiredFieldError(ApiError): + def __init__(self, body: ObjectWithRequiredField): + super().__init__(status_code=400, body=body) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/__init__.py new file mode 100644 index 00000000000..2620e6eea12 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/__init__.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +from .double_optional import DoubleOptional +from .nested_object_with_optional_field import NestedObjectWithOptionalField +from .nested_object_with_required_field import NestedObjectWithRequiredField +from .object_with_map_of_map import ObjectWithMapOfMap +from .object_with_optional_field import ObjectWithOptionalField +from .object_with_required_field import ObjectWithRequiredField +from .optional_alias import OptionalAlias + +__all__ = [ + "DoubleOptional", + "NestedObjectWithOptionalField", + "NestedObjectWithRequiredField", + "ObjectWithMapOfMap", + "ObjectWithOptionalField", + "ObjectWithRequiredField", + "OptionalAlias", +] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/double_optional.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/double_optional.py new file mode 100644 index 00000000000..35b10659d34 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/double_optional.py @@ -0,0 +1,16 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.pydantic_utilities import UniversalBaseModel +import typing_extensions +import typing +from .optional_alias import OptionalAlias +from ....core.serialization import FieldMetadata +import pydantic + + +class DoubleOptional(UniversalBaseModel): + optional_alias: typing_extensions.Annotated[ + typing.Optional[OptionalAlias], FieldMetadata(alias="optionalAlias") + ] = None + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/nested_object_with_optional_field.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/nested_object_with_optional_field.py new file mode 100644 index 00000000000..52522d1c370 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/nested_object_with_optional_field.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.pydantic_utilities import UniversalBaseModel +import typing +import typing_extensions +from .object_with_optional_field import ObjectWithOptionalField +from ....core.serialization import FieldMetadata +import pydantic + + +class NestedObjectWithOptionalField(UniversalBaseModel): + string: typing.Optional[str] = None + nested_object: typing_extensions.Annotated[ + typing.Optional[ObjectWithOptionalField], FieldMetadata(alias="NestedObject") + ] = None + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/nested_object_with_required_field.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/nested_object_with_required_field.py new file mode 100644 index 00000000000..aa8dde2fc07 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/nested_object_with_required_field.py @@ -0,0 +1,15 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.pydantic_utilities import UniversalBaseModel +import typing_extensions +from .object_with_optional_field import ObjectWithOptionalField +from ....core.serialization import FieldMetadata +import typing +import pydantic + + +class NestedObjectWithRequiredField(UniversalBaseModel): + string: str + nested_object: typing_extensions.Annotated[ObjectWithOptionalField, FieldMetadata(alias="NestedObject")] + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/object_with_map_of_map.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/object_with_map_of_map.py new file mode 100644 index 00000000000..8af294cf5fa --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/object_with_map_of_map.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.pydantic_utilities import UniversalBaseModel +import typing_extensions +import typing +from ....core.serialization import FieldMetadata +import pydantic + + +class ObjectWithMapOfMap(UniversalBaseModel): + map_: typing_extensions.Annotated[typing.Dict[str, typing.Dict[str, str]], FieldMetadata(alias="map")] + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/object_with_optional_field.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/object_with_optional_field.py new file mode 100644 index 00000000000..ef8b66a7040 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/object_with_optional_field.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.pydantic_utilities import UniversalBaseModel +import typing +import pydantic +import typing_extensions +from ....core.serialization import FieldMetadata +import datetime as dt +import uuid + + +class ObjectWithOptionalField(UniversalBaseModel): + string: typing.Optional[str] = pydantic.Field(default=None) + """ + This is a rather long descriptor of this single field in a more complex type. If you ask me I think this is a pretty good description for this field all things considered. + """ + + integer: typing.Optional[int] = None + long_: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="long")] = None + double: typing.Optional[float] = None + bool_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="bool")] = None + datetime: typing.Optional[dt.datetime] = None + date: typing.Optional[dt.date] = None + uuid_: typing_extensions.Annotated[typing.Optional[uuid.UUID], FieldMetadata(alias="uuid")] = None + base_64: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="base64")] = None + list_: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="list")] = None + set_: typing_extensions.Annotated[typing.Optional[typing.Set[str]], FieldMetadata(alias="set")] = None + map_: typing_extensions.Annotated[typing.Optional[typing.Dict[int, str]], FieldMetadata(alias="map")] = None + bigint: typing.Optional[str] = None + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/object_with_required_field.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/object_with_required_field.py new file mode 100644 index 00000000000..debc61252d2 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/object_with_required_field.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.pydantic_utilities import UniversalBaseModel +import typing +import pydantic + + +class ObjectWithRequiredField(UniversalBaseModel): + string: str + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/optional_alias.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/optional_alias.py new file mode 100644 index 00000000000..760b1c2329a --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/optional_alias.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +from ....core.pydantic_utilities import UniversalBaseModel +import typing +import pydantic + + +class OptionalAlias(UniversalBaseModel): + root: typing.Optional[str] + + def get_as_str(self) -> typing.Optional[str]: + return self.root + + @staticmethod + def from_str(value: typing.Optional[str]) -> OptionalAlias: + return OptionalAlias(root=value) + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/__init__.py new file mode 100644 index 00000000000..30187ae029e --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/__init__.py @@ -0,0 +1,6 @@ +# This file was auto-generated by Fern from our API Definition. + +from .types import Animal, Animal_Cat, Animal_Dog, Cat, Dog +from .errors import ErrorWithUnionBody + +__all__ = ["Animal", "Animal_Cat", "Animal_Dog", "Cat", "Dog", "ErrorWithUnionBody"] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/errors/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/errors/__init__.py new file mode 100644 index 00000000000..568a71fa3c4 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/errors/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .error_with_union_body import ErrorWithUnionBody + +__all__ = ["ErrorWithUnionBody"] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/errors/error_with_union_body.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/errors/error_with_union_body.py new file mode 100644 index 00000000000..3ead0383351 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/errors/error_with_union_body.py @@ -0,0 +1,9 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.api_error import ApiError +from ..types.animal import Animal + + +class ErrorWithUnionBody(ApiError): + def __init__(self, body: Animal): + super().__init__(status_code=400, body=body) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/__init__.py new file mode 100644 index 00000000000..44ff66be5d9 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/__init__.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +from .animal import Animal, Animal_Cat, Animal_Dog +from .cat import Cat +from .dog import Dog + +__all__ = ["Animal", "Animal_Cat", "Animal_Dog", "Cat", "Dog"] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/animal.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/animal.py new file mode 100644 index 00000000000..38fbcb28d56 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/animal.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +from ....core.pydantic_utilities import UniversalBaseModel +import typing +import typing_extensions +from ....core.serialization import FieldMetadata +import pydantic + + +class Animal_Dog(UniversalBaseModel): + animal: typing.Literal["dog"] = "dog" + name: str + likes_to_woof: typing_extensions.Annotated[bool, FieldMetadata(alias="likesToWoof")] + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + + +class Animal_Cat(UniversalBaseModel): + animal: typing.Literal["cat"] = "cat" + name: str + likes_to_meow: typing_extensions.Annotated[bool, FieldMetadata(alias="likesToMeow")] + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + + +Animal = typing.Union[Animal_Dog, Animal_Cat] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/cat.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/cat.py new file mode 100644 index 00000000000..be4bac8b5be --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/cat.py @@ -0,0 +1,14 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.pydantic_utilities import UniversalBaseModel +import typing_extensions +from ....core.serialization import FieldMetadata +import typing +import pydantic + + +class Cat(UniversalBaseModel): + name: str + likes_to_meow: typing_extensions.Annotated[bool, FieldMetadata(alias="likesToMeow")] + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/dog.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/dog.py new file mode 100644 index 00000000000..432acbaa09b --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/union/types/dog.py @@ -0,0 +1,14 @@ +# This file was auto-generated by Fern from our API Definition. + +from ....core.pydantic_utilities import UniversalBaseModel +import typing_extensions +from ....core.serialization import FieldMetadata +import typing +import pydantic + + +class Dog(UniversalBaseModel): + name: str + likes_to_woof: typing_extensions.Annotated[bool, FieldMetadata(alias="likesToWoof")] + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/version.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/version.py new file mode 100644 index 00000000000..ac44536abdb --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/version.py @@ -0,0 +1,3 @@ +from importlib import metadata + +__version__ = metadata.version("fern_exhaustive") diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/conftest.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/conftest.py new file mode 100644 index 00000000000..54c31d3dab5 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/conftest.py @@ -0,0 +1,16 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +import os +import pytest +from seed import AsyncSeedExhaustive + + +@pytest.fixture +def client() -> SeedExhaustive: + return SeedExhaustive(token=os.getenv("ENV_TOKEN", "token"), base_url=os.getenv("TESTS_BASE_URL", "base_url")) + + +@pytest.fixture +def async_client() -> AsyncSeedExhaustive: + return AsyncSeedExhaustive(token=os.getenv("ENV_TOKEN", "token"), base_url=os.getenv("TESTS_BASE_URL", "base_url")) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/custom/test_client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/custom/test_client.py new file mode 100644 index 00000000000..73f811f5ede --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/custom/test_client.py @@ -0,0 +1,7 @@ +import pytest + + +# Get started with writing tests with pytest at https://docs.pytest.org +@pytest.mark.skip(reason="Unimplemented") +def test_client() -> None: + assert True == True diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_container.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_container.py new file mode 100644 index 00000000000..bbd90d449bc --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_container.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive +import typing +from ..utilities import validate_response +from seed.types.object import ObjectWithRequiredField + + +async def test_get_and_return_list_of_primitives(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = ["string", "string"] + expected_types: typing.Tuple[typing.Any, typing.Any] = ("list", {0: None, 1: None}) + response = client.endpoints.container.get_and_return_list_of_primitives(request=["string", "string"]) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.container.get_and_return_list_of_primitives( + request=["string", "string"] + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_list_of_objects(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = [{"string": "string"}, {"string": "string"}] + expected_types: typing.Tuple[typing.Any, typing.Any] = ("list", {0: {"string": None}, 1: {"string": None}}) + response = client.endpoints.container.get_and_return_list_of_objects( + request=[ObjectWithRequiredField(string="string"), ObjectWithRequiredField(string="string")] + ) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.container.get_and_return_list_of_objects( + request=[ObjectWithRequiredField(string="string"), ObjectWithRequiredField(string="string")] + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_set_of_primitives(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = ["string"] + expected_types: typing.Tuple[typing.Any, typing.Any] = ("set", {0: None}) + response = client.endpoints.container.get_and_return_set_of_primitives(request={"string"}) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.container.get_and_return_set_of_primitives(request={"string"}) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_set_of_objects(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = [{"string": "string"}] + expected_types: typing.Tuple[typing.Any, typing.Any] = ("set", {0: {"string": None}}) + response = client.endpoints.container.get_and_return_set_of_objects( + request=[ObjectWithRequiredField(string="string")] + ) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.container.get_and_return_set_of_objects( + request=[ObjectWithRequiredField(string="string")] + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_map_prim_to_prim(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = {"string": "string"} + expected_types: typing.Tuple[typing.Any, typing.Any] = ("dict", {0: (None, None)}) + response = client.endpoints.container.get_and_return_map_prim_to_prim(request={"string": "string"}) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.container.get_and_return_map_prim_to_prim( + request={"string": "string"} + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_map_of_prim_to_object(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = {"string": {"string": "string"}} + expected_types: typing.Tuple[typing.Any, typing.Any] = ("dict", {0: (None, {"string": None})}) + response = client.endpoints.container.get_and_return_map_of_prim_to_object( + request={"string": ObjectWithRequiredField(string="string")} + ) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.container.get_and_return_map_of_prim_to_object( + request={"string": ObjectWithRequiredField(string="string")} + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_optional(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = {"string": "string"} + expected_types: typing.Any = {"string": None} + response = client.endpoints.container.get_and_return_optional(request=ObjectWithRequiredField(string="string")) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.container.get_and_return_optional( + request=ObjectWithRequiredField(string="string") + ) + validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_enum.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_enum.py new file mode 100644 index 00000000000..9e65f445a59 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_enum.py @@ -0,0 +1,16 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive +import typing +from ..utilities import validate_response + + +async def test_get_and_return_enum(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = "SUNNY" + expected_types: typing.Any = None + response = client.endpoints.enum.get_and_return_enum(request="SUNNY") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.enum.get_and_return_enum(request="SUNNY") + validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_http_methods.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_http_methods.py new file mode 100644 index 00000000000..537a9114284 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_http_methods.py @@ -0,0 +1,172 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive +import typing +from ..utilities import validate_response +import datetime +import uuid + + +async def test_test_get(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = "string" + expected_types: typing.Any = None + response = client.endpoints.http_methods.test_get(id="id") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.http_methods.test_get(id="id") + validate_response(async_response, expected_response, expected_types) + + +async def test_test_post(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": True, + "datetime": "2024-01-15T09:30:00Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": ["list", "list"], + "set": ["set"], + "map": {"1": "map"}, + "bigint": "1000000", + } + expected_types: typing.Any = { + "string": None, + "integer": "integer", + "long": None, + "double": None, + "bool": None, + "datetime": "datetime", + "date": "date", + "uuid": "uuid", + "base64": None, + "list": ("list", {0: None, 1: None}), + "set": ("set", {0: None}), + "map": ("dict", {0: ("integer", None)}), + "bigint": None, + } + response = client.endpoints.http_methods.test_post(string="string") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.http_methods.test_post(string="string") + validate_response(async_response, expected_response, expected_types) + + +async def test_test_put(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": True, + "datetime": "2024-01-15T09:30:00Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": ["list", "list"], + "set": ["set"], + "map": {"1": "map"}, + "bigint": "1000000", + } + expected_types: typing.Any = { + "string": None, + "integer": "integer", + "long": None, + "double": None, + "bool": None, + "datetime": "datetime", + "date": "date", + "uuid": "uuid", + "base64": None, + "list": ("list", {0: None, 1: None}), + "set": ("set", {0: None}), + "map": ("dict", {0: ("integer", None)}), + "bigint": None, + } + response = client.endpoints.http_methods.test_put(id="id", string="string") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.http_methods.test_put(id="id", string="string") + validate_response(async_response, expected_response, expected_types) + + +async def test_test_patch(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": True, + "datetime": "2024-01-15T09:30:00Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": ["list", "list"], + "set": ["set"], + "map": {"1": "map"}, + "bigint": "1000000", + } + expected_types: typing.Any = { + "string": None, + "integer": "integer", + "long": None, + "double": None, + "bool": None, + "datetime": "datetime", + "date": "date", + "uuid": "uuid", + "base64": None, + "list": ("list", {0: None, 1: None}), + "set": ("set", {0: None}), + "map": ("dict", {0: ("integer", None)}), + "bigint": None, + } + response = client.endpoints.http_methods.test_patch( + id="id", + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.http_methods.test_patch( + id="id", + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_test_delete(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = True + expected_types: typing.Any = None + response = client.endpoints.http_methods.test_delete(id="id") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.http_methods.test_delete(id="id") + validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_object.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_object.py new file mode 100644 index 00000000000..91f189d3598 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_object.py @@ -0,0 +1,382 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive +import typing +import datetime +import uuid +from ..utilities import validate_response +from seed.types.object import ObjectWithOptionalField +from seed.types.object import NestedObjectWithRequiredField + + +async def test_get_and_return_with_optional_field(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": True, + "datetime": "2024-01-15T09:30:00Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": ["list", "list"], + "set": ["set"], + "map": {"1": "map"}, + "bigint": "1000000", + } + expected_types: typing.Any = { + "string": None, + "integer": "integer", + "long": None, + "double": None, + "bool": None, + "datetime": "datetime", + "date": "date", + "uuid": "uuid", + "base64": None, + "list": ("list", {0: None, 1: None}), + "set": ("set", {0: None}), + "map": ("dict", {0: ("integer", None)}), + "bigint": None, + } + response = client.endpoints.object.get_and_return_with_optional_field( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.object.get_and_return_with_optional_field( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_with_required_field(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = {"string": "string"} + expected_types: typing.Any = {"string": None} + response = client.endpoints.object.get_and_return_with_required_field(string="string") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.object.get_and_return_with_required_field(string="string") + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_with_map_of_map(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = {"map": {"map": {"map": "map"}}} + expected_types: typing.Any = {"map": ("dict", {0: (None, ("dict", {0: (None, None)}))})} + response = client.endpoints.object.get_and_return_with_map_of_map(map_={"map": {"map": "map"}}) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.object.get_and_return_with_map_of_map(map_={"map": {"map": "map"}}) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_nested_with_optional_field( + client: SeedExhaustive, async_client: AsyncSeedExhaustive +) -> None: + expected_response: typing.Any = { + "string": "string", + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": True, + "datetime": "2024-01-15T09:30:00Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": ["list", "list"], + "set": ["set"], + "map": {"1": "map"}, + "bigint": "1000000", + }, + } + expected_types: typing.Any = { + "string": None, + "NestedObject": { + "string": None, + "integer": "integer", + "long": None, + "double": None, + "bool": None, + "datetime": "datetime", + "date": "date", + "uuid": "uuid", + "base64": None, + "list": ("list", {0: None, 1: None}), + "set": ("set", {0: None}), + "map": ("dict", {0: ("integer", None)}), + "bigint": None, + }, + } + response = client.endpoints.object.get_and_return_nested_with_optional_field( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.object.get_and_return_nested_with_optional_field( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_nested_with_required_field( + client: SeedExhaustive, async_client: AsyncSeedExhaustive +) -> None: + expected_response: typing.Any = { + "string": "string", + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": True, + "datetime": "2024-01-15T09:30:00Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": ["list", "list"], + "set": ["set"], + "map": {"1": "map"}, + "bigint": "1000000", + }, + } + expected_types: typing.Any = { + "string": None, + "NestedObject": { + "string": None, + "integer": "integer", + "long": None, + "double": None, + "bool": None, + "datetime": "datetime", + "date": "date", + "uuid": "uuid", + "base64": None, + "list": ("list", {0: None, 1: None}), + "set": ("set", {0: None}), + "map": ("dict", {0: ("integer", None)}), + "bigint": None, + }, + } + response = client.endpoints.object.get_and_return_nested_with_required_field( + string_="string", + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.object.get_and_return_nested_with_required_field( + string_="string", + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_nested_with_required_field_as_list( + client: SeedExhaustive, async_client: AsyncSeedExhaustive +) -> None: + expected_response: typing.Any = { + "string": "string", + "NestedObject": { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": True, + "datetime": "2024-01-15T09:30:00Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": ["list", "list"], + "set": ["set"], + "map": {"1": "map"}, + "bigint": "1000000", + }, + } + expected_types: typing.Any = { + "string": None, + "NestedObject": { + "string": None, + "integer": "integer", + "long": None, + "double": None, + "bool": None, + "datetime": "datetime", + "date": "date", + "uuid": "uuid", + "base64": None, + "list": ("list", {0: None, 1: None}), + "set": ("set", {0: None}), + "map": ("dict", {0: ("integer", None)}), + "bigint": None, + }, + } + response = client.endpoints.object.get_and_return_nested_with_required_field_as_list( + request=[ + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ), + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ), + ] + ) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.object.get_and_return_nested_with_required_field_as_list( + request=[ + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ), + NestedObjectWithRequiredField( + string="string", + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ), + ] + ) + validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_params.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_params.py new file mode 100644 index 00000000000..de637feba72 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_params.py @@ -0,0 +1,65 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive +import typing +from ..utilities import validate_response + + +async def test_get_with_path(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = "string" + expected_types: typing.Any = None + response = client.endpoints.params.get_with_path(param="param") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.params.get_with_path(param="param") + validate_response(async_response, expected_response, expected_types) + + +async def test_get_with_query(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.endpoints.params.get_with_query(query="query", number=1) # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.endpoints.params.get_with_query(query="query", number=1) # type: ignore[func-returns-value] + is None + ) + + +async def test_get_with_allow_multiple_query(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.endpoints.params.get_with_allow_multiple_query(query="query", numer=1) # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.endpoints.params.get_with_allow_multiple_query(query="query", numer=1) # type: ignore[func-returns-value] + is None + ) + + +async def test_get_with_path_and_query(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.endpoints.params.get_with_path_and_query(param="param", query="query") # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.endpoints.params.get_with_path_and_query(param="param", query="query") # type: ignore[func-returns-value] + is None + ) + + +async def test_modify_with_path(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = "string" + expected_types: typing.Any = None + response = client.endpoints.params.modify_with_path(param="param", request="string") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.params.modify_with_path(param="param", request="string") + validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_primitive.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_primitive.py new file mode 100644 index 00000000000..ad943784420 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_primitive.py @@ -0,0 +1,106 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive +import typing +from ..utilities import validate_response +import datetime +import uuid + + +async def test_get_and_return_string(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = "string" + expected_types: typing.Any = None + response = client.endpoints.primitive.get_and_return_string(request="string") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.primitive.get_and_return_string(request="string") + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_int(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = 1 + expected_types: typing.Any = "integer" + response = client.endpoints.primitive.get_and_return_int(request=1) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.primitive.get_and_return_int(request=1) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_long(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = 1000000 + expected_types: typing.Any = None + response = client.endpoints.primitive.get_and_return_long(request=1000000) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.primitive.get_and_return_long(request=1000000) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_double(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = 1.1 + expected_types: typing.Any = None + response = client.endpoints.primitive.get_and_return_double(request=1.1) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.primitive.get_and_return_double(request=1.1) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_bool(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = True + expected_types: typing.Any = None + response = client.endpoints.primitive.get_and_return_bool(request=True) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.primitive.get_and_return_bool(request=True) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_datetime(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = "2024-01-15T09:30:00Z" + expected_types: typing.Any = "datetime" + response = client.endpoints.primitive.get_and_return_datetime( + request=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00") + ) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.primitive.get_and_return_datetime( + request=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00") + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_date(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = "2023-01-15" + expected_types: typing.Any = "date" + response = client.endpoints.primitive.get_and_return_date(request=datetime.date.fromisoformat("2023-01-15")) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.primitive.get_and_return_date( + request=datetime.date.fromisoformat("2023-01-15") + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_uuid(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + expected_types: typing.Any = "uuid" + response = client.endpoints.primitive.get_and_return_uuid(request=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.primitive.get_and_return_uuid( + request=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") + ) + validate_response(async_response, expected_response, expected_types) + + +async def test_get_and_return_base_64(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = "SGVsbG8gd29ybGQh" + expected_types: typing.Any = None + response = client.endpoints.primitive.get_and_return_base_64(request="SGVsbG8gd29ybGQh") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.primitive.get_and_return_base_64(request="SGVsbG8gd29ybGQh") + validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_union.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_union.py new file mode 100644 index 00000000000..47567726350 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/endpoints/test_union.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive +import typing +from seed.types.union import Animal_Dog +from ..utilities import validate_response + + +async def test_get_and_return_union(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = {"animal": "dog", "name": "name", "likesToWoof": True} + expected_types: typing.Any = "no_validate" + response = client.endpoints.union.get_and_return_union(request=Animal_Dog(name="name", likes_to_woof=True)) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.endpoints.union.get_and_return_union( + request=Animal_Dog(name="name", likes_to_woof=True) + ) + validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_inlined_requests.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_inlined_requests.py new file mode 100644 index 00000000000..9668eb1aac9 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_inlined_requests.py @@ -0,0 +1,83 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive +import typing +from seed.types.object import ObjectWithOptionalField +import datetime +import uuid +from .utilities import validate_response + + +async def test_post_with_object_bodyand_response(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": True, + "datetime": "2024-01-15T09:30:00Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": ["list", "list"], + "set": ["set"], + "map": {"1": "map"}, + "bigint": "1000000", + } + expected_types: typing.Any = { + "string": None, + "integer": "integer", + "long": None, + "double": None, + "bool": None, + "datetime": "datetime", + "date": "date", + "uuid": "uuid", + "base64": None, + "list": ("list", {0: None, 1: None}), + "set": ("set", {0: None}), + "map": ("dict", {0: ("integer", None)}), + "bigint": None, + } + response = client.inlined_requests.post_with_object_bodyand_response( + string="string", + integer=1, + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.inlined_requests.post_with_object_bodyand_response( + string="string", + integer=1, + nested_object=ObjectWithOptionalField( + string="string", + integer=1, + long_=1000000, + double=1.1, + bool_=True, + datetime=datetime.datetime.fromisoformat("2024-01-15 09:30:00+00:00"), + date=datetime.date.fromisoformat("2023-01-15"), + uuid_=uuid.UUID("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), + base_64="SGVsbG8gd29ybGQh", + list_=["list", "list"], + set_={"set"}, + map_={1: "map"}, + bigint=1000000, + ), + ) + validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_no_auth.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_no_auth.py new file mode 100644 index 00000000000..667b7545590 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_no_auth.py @@ -0,0 +1,16 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive +import typing +from .utilities import validate_response + + +async def test_post_with_no_auth(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = True + expected_types: typing.Any = None + response = client.no_auth.post_with_no_auth(request={"key": "value"}) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.no_auth.post_with_no_auth(request={"key": "value"}) + validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_no_req_body.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_no_req_body.py new file mode 100644 index 00000000000..d0f467bb431 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_no_req_body.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive +import typing +from .utilities import validate_response + + +async def test_get_with_no_request_body(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = { + "string": "string", + "integer": 1, + "long": 1000000, + "double": 1.1, + "bool": True, + "datetime": "2024-01-15T09:30:00Z", + "date": "2023-01-15", + "uuid": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + "base64": "SGVsbG8gd29ybGQh", + "list": ["list", "list"], + "set": ["set"], + "map": {"1": "map"}, + "bigint": "1000000", + } + expected_types: typing.Any = { + "string": None, + "integer": "integer", + "long": None, + "double": None, + "bool": None, + "datetime": "datetime", + "date": "date", + "uuid": "uuid", + "base64": None, + "list": ("list", {0: None, 1: None}), + "set": ("set", {0: None}), + "map": ("dict", {0: ("integer", None)}), + "bigint": None, + } + response = client.no_req_body.get_with_no_request_body() + validate_response(response, expected_response, expected_types) + + async_response = await async_client.no_req_body.get_with_no_request_body() + validate_response(async_response, expected_response, expected_types) + + +async def test_post_with_no_request_body(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + expected_response: typing.Any = "string" + expected_types: typing.Any = None + response = client.no_req_body.post_with_no_request_body() + validate_response(response, expected_response, expected_types) + + async_response = await async_client.no_req_body.post_with_no_request_body() + validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_req_with_headers.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_req_with_headers.py new file mode 100644 index 00000000000..4105ce39190 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/test_req_with_headers.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed import SeedExhaustive +from seed import AsyncSeedExhaustive + + +async def test_get_with_custom_header(client: SeedExhaustive, async_client: AsyncSeedExhaustive) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.req_with_headers.get_with_custom_header( + x_test_service_header="X-TEST-SERVICE-HEADER", + x_test_endpoint_header="X-TEST-ENDPOINT-HEADER", + request="string", + ) # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.req_with_headers.get_with_custom_header( + x_test_service_header="X-TEST-SERVICE-HEADER", + x_test_endpoint_header="X-TEST-ENDPOINT-HEADER", + request="string", + ) # type: ignore[func-returns-value] + is None + ) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utilities.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utilities.py new file mode 100644 index 00000000000..3d228806a9c --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utilities.py @@ -0,0 +1,162 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +import uuid + +from dateutil import parser + +import pydantic + + +def cast_field(json_expectation: typing.Any, type_expectation: typing.Any) -> typing.Any: + # Cast these specific types which come through as string and expect our + # models to cast to the correct type. + if type_expectation == "uuid": + return uuid.UUID(json_expectation) + elif type_expectation == "date": + return parser.parse(json_expectation).date() + elif type_expectation == "datetime": + return parser.parse(json_expectation) + elif type_expectation == "set": + return set(json_expectation) + elif type_expectation == "integer": + # Necessary as we allow numeric keys, but JSON makes them strings + return int(json_expectation) + + return json_expectation + + +def validate_field(response: typing.Any, json_expectation: typing.Any, type_expectation: typing.Any) -> None: + # Allow for an escape hatch if the object cannot be validated + if type_expectation == "no_validate": + return + + is_container_of_complex_type = False + # Parse types in containers, note that dicts are handled within `validate_response` + if isinstance(json_expectation, list): + if isinstance(type_expectation, tuple): + container_expectation = type_expectation[0] + contents_expectation = type_expectation[1] + + cast_json_expectation = [] + for idx, ex in enumerate(json_expectation): + if isinstance(contents_expectation, dict): + entry_expectation = contents_expectation.get(idx) + if isinstance(entry_expectation, dict): + is_container_of_complex_type = True + validate_response( + response=response[idx], + json_expectation=ex, + type_expectations=entry_expectation, + ) + else: + cast_json_expectation.append(cast_field(ex, entry_expectation)) + else: + cast_json_expectation.append(ex) + json_expectation = cast_json_expectation + + # Note that we explicitly do not allow for sets of pydantic models as they are not hashable, so + # if any of the values of the set have a type_expectation of a dict, we're assuming it's a pydantic + # model and keeping it a list. + if container_expectation != "set" or not any( + map( + lambda value: isinstance(value, dict), + list(contents_expectation.values()), + ) + ): + json_expectation = cast_field(json_expectation, container_expectation) + elif isinstance(type_expectation, tuple): + container_expectation = type_expectation[0] + contents_expectation = type_expectation[1] + if isinstance(contents_expectation, dict): + json_expectation = { + cast_field( + key, + contents_expectation.get(idx)[0] # type: ignore + if contents_expectation.get(idx) is not None + else None, + ): cast_field( + value, + contents_expectation.get(idx)[1] # type: ignore + if contents_expectation.get(idx) is not None + else None, + ) + for idx, (key, value) in enumerate(json_expectation.items()) + } + else: + json_expectation = cast_field(json_expectation, container_expectation) + elif type_expectation is not None: + json_expectation = cast_field(json_expectation, type_expectation) + + # When dealing with containers of models, etc. we're validating them implicitly, so no need to check the resultant list + if not is_container_of_complex_type: + assert ( + json_expectation == response + ), "Primitives found, expected: {0} (type: {1}), Actual: {2} (type: {3})".format( + json_expectation, type(json_expectation), response, type(response) + ) + + +# Arg type_expectations is a deeply nested structure that matches the response, but with the values replaced with the expected types +def validate_response(response: typing.Any, json_expectation: typing.Any, type_expectations: typing.Any) -> None: + # Allow for an escape hatch if the object cannot be validated + if type_expectations == "no_validate": + return + + if ( + not isinstance(response, list) + and not isinstance(response, dict) + and not issubclass(type(response), pydantic.BaseModel) + ): + validate_field( + response=response, + json_expectation=json_expectation, + type_expectation=type_expectations, + ) + return + + if isinstance(response, list): + assert len(response) == len(json_expectation), "Length mismatch, expected: {0}, Actual: {1}".format( + len(response), len(json_expectation) + ) + content_expectation = type_expectations + if isinstance(type_expectations, tuple): + content_expectation = type_expectations[1] + for idx, item in enumerate(response): + validate_response( + response=item, + json_expectation=json_expectation[idx], + type_expectations=content_expectation[idx], + ) + else: + response_json = response + if issubclass(type(response), pydantic.BaseModel): + response_json = response.dict(by_alias=True) + + for key, value in json_expectation.items(): + assert key in response_json, "Field {0} not found within the response object: {1}".format( + key, response_json + ) + + type_expectation = None + if type_expectations is not None and isinstance(type_expectations, dict): + type_expectation = type_expectations.get(key) + + # If your type_expectation is a tuple then you have a container field, process it as such + # Otherwise, we're just validating a single field that's a pydantic model. + if isinstance(value, dict) and not isinstance(type_expectation, tuple): + validate_response( + response=response_json[key], + json_expectation=value, + type_expectations=type_expectation, + ) + else: + validate_field( + response=response_json[key], + json_expectation=value, + type_expectation=type_expectation, + ) + + # Ensure there are no additional fields here either + del response_json[key] + assert len(response_json) == 0, "Additional fields found, expected None: {0}".format(response_json) diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/__init__.py new file mode 100644 index 00000000000..f3ea2659bb1 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/__init__.py new file mode 100644 index 00000000000..3a1c852e71e --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/__init__.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +# This file was auto-generated by Fern from our API Definition. + +from .circle import CircleParams +from .object_with_defaults import ObjectWithDefaultsParams +from .object_with_optional_field import ObjectWithOptionalFieldParams +from .shape import ShapeParams, Shape_CircleParams, Shape_SquareParams +from .square import SquareParams +from .undiscriminated_shape import UndiscriminatedShapeParams + +__all__ = [ + "CircleParams", + "ObjectWithDefaultsParams", + "ObjectWithOptionalFieldParams", + "ShapeParams", + "Shape_CircleParams", + "Shape_SquareParams", + "SquareParams", + "UndiscriminatedShapeParams", +] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/circle.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/circle.py new file mode 100644 index 00000000000..6522dc58c5a --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/circle.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions +import typing_extensions +from seed.core.serialization import FieldMetadata + + +class CircleParams(typing_extensions.TypedDict): + radius_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="radiusMeasurement")] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/color.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/color.py new file mode 100644 index 00000000000..2aa2c4c52f0 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/color.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +# This file was auto-generated by Fern from our API Definition. + +import typing + +Color = typing.Union[typing.Literal["red", "blue"], typing.Any] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/object_with_defaults.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/object_with_defaults.py new file mode 100644 index 00000000000..ef14f7b2c9d --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/object_with_defaults.py @@ -0,0 +1,16 @@ +# This file was auto-generated by Fern from our API Definition. + +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions +import typing_extensions + + +class ObjectWithDefaultsParams(typing_extensions.TypedDict): + """ + Defines properties with default values and validation rules. + """ + + decimal: typing_extensions.NotRequired[float] + string: typing_extensions.NotRequired[str] + required_string: str diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/object_with_optional_field.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/object_with_optional_field.py new file mode 100644 index 00000000000..fc5a379b967 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/object_with_optional_field.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions +import typing +import typing_extensions +from seed.core.serialization import FieldMetadata +import datetime as dt +import uuid +from .color import Color +from .shape import ShapeParams +from .undiscriminated_shape import UndiscriminatedShapeParams + + +class ObjectWithOptionalFieldParams(typing_extensions.TypedDict): + literal: typing.Literal["lit_one"] + string: typing_extensions.NotRequired[str] + integer: typing_extensions.NotRequired[int] + long_: typing_extensions.NotRequired[typing_extensions.Annotated[int, FieldMetadata(alias="long")]] + double: typing_extensions.NotRequired[float] + bool_: typing_extensions.NotRequired[typing_extensions.Annotated[bool, FieldMetadata(alias="bool")]] + datetime: typing_extensions.NotRequired[dt.datetime] + date: typing_extensions.NotRequired[dt.date] + uuid_: typing_extensions.NotRequired[typing_extensions.Annotated[uuid.UUID, FieldMetadata(alias="uuid")]] + base_64: typing_extensions.NotRequired[typing_extensions.Annotated[str, FieldMetadata(alias="base64")]] + list_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Sequence[str], FieldMetadata(alias="list")]] + set_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Set[str], FieldMetadata(alias="set")]] + map_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Dict[int, str], FieldMetadata(alias="map")]] + enum: typing_extensions.NotRequired[Color] + union: typing_extensions.NotRequired[ShapeParams] + second_union: typing_extensions.NotRequired[ShapeParams] + undiscriminated_union: typing_extensions.NotRequired[UndiscriminatedShapeParams] + any: typing.Optional[typing.Any] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/shape.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/shape.py new file mode 100644 index 00000000000..ae113ae0609 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/shape.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +import typing_extensions +import typing_extensions +import typing +from seed.core.serialization import FieldMetadata + + +class Base(typing_extensions.TypedDict): + id: str + + +class Shape_CircleParams(Base): + shape_type: typing_extensions.Annotated[typing.Literal["circle"], FieldMetadata(alias="shapeType")] + radius_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="radiusMeasurement")] + + +class Shape_SquareParams(Base): + shape_type: typing_extensions.Annotated[typing.Literal["square"], FieldMetadata(alias="shapeType")] + length_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="lengthMeasurement")] + + +ShapeParams = typing.Union[Shape_CircleParams, Shape_SquareParams] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/square.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/square.py new file mode 100644 index 00000000000..7f6f79a3ddc --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/square.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions +import typing_extensions +from seed.core.serialization import FieldMetadata + + +class SquareParams(typing_extensions.TypedDict): + length_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="lengthMeasurement")] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/undiscriminated_shape.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/undiscriminated_shape.py new file mode 100644 index 00000000000..68876a23c38 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/assets/models/undiscriminated_shape.py @@ -0,0 +1,9 @@ +# This file was auto-generated by Fern from our API Definition. + +# This file was auto-generated by Fern from our API Definition. + +import typing +from .circle import CircleParams +from .square import SquareParams + +UndiscriminatedShapeParams = typing.Union[CircleParams, SquareParams] diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/test_http_client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/test_http_client.py new file mode 100644 index 00000000000..a541bae6531 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/test_http_client.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +from seed.core.http_client import get_request_body +from seed.core.request_options import RequestOptions + + +def get_request_options() -> RequestOptions: + return {"additional_body_parameters": {"see you": "later"}} + + +def test_get_json_request_body() -> None: + json_body, data_body = get_request_body(json={"hello": "world"}, data=None, request_options=None, omit=None) + assert json_body == {"hello": "world"} + assert data_body is None + + json_body_extras, data_body_extras = get_request_body( + json={"goodbye": "world"}, data=None, request_options=get_request_options(), omit=None + ) + + assert json_body_extras == {"goodbye": "world", "see you": "later"} + assert data_body_extras is None + + +def test_get_files_request_body() -> None: + json_body, data_body = get_request_body(json=None, data={"hello": "world"}, request_options=None, omit=None) + assert data_body == {"hello": "world"} + assert json_body is None + + json_body_extras, data_body_extras = get_request_body( + json=None, data={"goodbye": "world"}, request_options=get_request_options(), omit=None + ) + + assert data_body_extras == {"goodbye": "world", "see you": "later"} + assert json_body_extras is None + + +def test_get_none_request_body() -> None: + json_body, data_body = get_request_body(json=None, data=None, request_options=None, omit=None) + assert data_body is None + assert json_body is None + + json_body_extras, data_body_extras = get_request_body( + json=None, data=None, request_options=get_request_options(), omit=None + ) + + assert json_body_extras == {"see you": "later"} + assert data_body_extras is None + + +def test_get_empty_json_request_body() -> None: + unrelated_request_options: RequestOptions = {"max_retries": 3} + json_body, data_body = get_request_body(json=None, data=None, request_options=unrelated_request_options, omit=None) + assert json_body is None + assert data_body is None + + json_body_extras, data_body_extras = get_request_body( + json={}, data=None, request_options=unrelated_request_options, omit=None + ) + + assert json_body_extras is None + assert data_body_extras is None diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/test_query_encoding.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/test_query_encoding.py new file mode 100644 index 00000000000..e075394a502 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/test_query_encoding.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + + +from seed.core.query_encoder import encode_query + + +def test_query_encoding_deep_objects() -> None: + assert encode_query({"hello world": "hello world"}) == [("hello world", "hello world")] + assert encode_query({"hello_world": {"hello": "world"}}) == [("hello_world[hello]", "world")] + assert encode_query({"hello_world": {"hello": {"world": "today"}, "test": "this"}, "hi": "there"}) == [ + ("hello_world[hello][world]", "today"), + ("hello_world[test]", "this"), + ("hi", "there"), + ] + + +def test_query_encoding_deep_object_arrays() -> None: + assert encode_query({"objects": [{"key": "hello", "value": "world"}, {"key": "foo", "value": "bar"}]}) == [ + ("objects[key]", "hello"), + ("objects[value]", "world"), + ("objects[key]", "foo"), + ("objects[value]", "bar"), + ] + assert encode_query( + {"users": [{"name": "string", "tags": ["string"]}, {"name": "string2", "tags": ["string2", "string3"]}]} + ) == [ + ("users[name]", "string"), + ("users[tags]", "string"), + ("users[name]", "string2"), + ("users[tags]", "string2"), + ("users[tags]", "string3"), + ] + + +def test_encode_query_with_none() -> None: + encoded = encode_query(None) + assert encoded == None diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/test_serialization.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/test_serialization.py new file mode 100644 index 00000000000..dd74836366c --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/tests/utils/test_serialization.py @@ -0,0 +1,72 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import List, Any + +from seed.core.serialization import convert_and_respect_annotation_metadata +from .assets.models import ShapeParams, ObjectWithOptionalFieldParams + + +UNION_TEST: ShapeParams = {"radius_measurement": 1.0, "shape_type": "circle", "id": "1"} +UNION_TEST_CONVERTED = {"shapeType": "circle", "radiusMeasurement": 1.0, "id": "1"} + + +def test_convert_and_respect_annotation_metadata() -> None: + data: ObjectWithOptionalFieldParams = { + "string": "string", + "long_": 12345, + "bool_": True, + "literal": "lit_one", + "any": "any", + } + converted = convert_and_respect_annotation_metadata( + object_=data, annotation=ObjectWithOptionalFieldParams, direction="write" + ) + assert converted == {"string": "string", "long": 12345, "bool": True, "literal": "lit_one", "any": "any"} + + +def test_convert_and_respect_annotation_metadata_in_list() -> None: + data: List[ObjectWithOptionalFieldParams] = [ + {"string": "string", "long_": 12345, "bool_": True, "literal": "lit_one", "any": "any"}, + {"string": "another string", "long_": 67890, "list_": [], "literal": "lit_one", "any": "any"}, + ] + converted = convert_and_respect_annotation_metadata( + object_=data, annotation=List[ObjectWithOptionalFieldParams], direction="write" + ) + + assert converted == [ + {"string": "string", "long": 12345, "bool": True, "literal": "lit_one", "any": "any"}, + {"string": "another string", "long": 67890, "list": [], "literal": "lit_one", "any": "any"}, + ] + + +def test_convert_and_respect_annotation_metadata_in_nested_object() -> None: + data: ObjectWithOptionalFieldParams = { + "string": "string", + "long_": 12345, + "union": UNION_TEST, + "literal": "lit_one", + "any": "any", + } + converted = convert_and_respect_annotation_metadata( + object_=data, annotation=ObjectWithOptionalFieldParams, direction="write" + ) + + assert converted == { + "string": "string", + "long": 12345, + "union": UNION_TEST_CONVERTED, + "literal": "lit_one", + "any": "any", + } + + +def test_convert_and_respect_annotation_metadata_in_union() -> None: + converted = convert_and_respect_annotation_metadata(object_=UNION_TEST, annotation=ShapeParams, direction="write") + + assert converted == UNION_TEST_CONVERTED + + +def test_convert_and_respect_annotation_metadata_with_empty_object() -> None: + data: Any = {} + converted = convert_and_respect_annotation_metadata(object_=data, annotation=ShapeParams, direction="write") + assert converted == data diff --git a/seed/python-sdk/seed.yml b/seed/python-sdk/seed.yml index bc917ac1789..7bb9b8ad14f 100644 --- a/seed/python-sdk/seed.yml +++ b/seed/python-sdk/seed.yml @@ -115,6 +115,11 @@ fixtures: version: v1 wrapped_aliases: True outputFolder: pydantic-v1-wrapped + - customConfig: + pydantic_config: + version: v2 + wrapped_aliases: True + outputFolder: pydantic-v2-wrapped - customConfig: pydantic_config: version: v1 diff --git a/seed/ruby-sdk/auth-environment-variables/lib/requests.rb b/seed/ruby-sdk/auth-environment-variables/lib/requests.rb index a4f9ecb9ffc..12e2dd27bff 100644 --- a/seed/ruby-sdk/auth-environment-variables/lib/requests.rb +++ b/seed/ruby-sdk/auth-environment-variables/lib/requests.rb @@ -48,7 +48,7 @@ def get_headers "X-Fern-SDK-Name": "fern_auth_environment_variables", "X-Fern-SDK-Version": "0.0.1" } - headers["X-FERN-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil? + headers["X-FERN-API-KEY"] = (@api_key.is_a?(Method) ? @api_key.call : @api_key) unless @api_key.nil? headers end end @@ -97,7 +97,7 @@ def get_headers "X-Fern-SDK-Name": "fern_auth_environment_variables", "X-Fern-SDK-Version": "0.0.1" } - headers["X-FERN-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil? + headers["X-FERN-API-KEY"] = (@api_key.is_a?(Method) ? @api_key.call : @api_key) unless @api_key.nil? headers end end diff --git a/seed/ruby-sdk/basic-auth-environment-variables/lib/requests.rb b/seed/ruby-sdk/basic-auth-environment-variables/lib/requests.rb index 5429dae9806..0011ed19086 100644 --- a/seed/ruby-sdk/basic-auth-environment-variables/lib/requests.rb +++ b/seed/ruby-sdk/basic-auth-environment-variables/lib/requests.rb @@ -46,7 +46,7 @@ def get_headers } unless @basic_auth_token.nil? headers["Authorization"] = - ((@basic_auth_token.is_a? Method) ? @basic_auth_token.call : @basic_auth_token) + (@basic_auth_token.is_a?(Method) ? @basic_auth_token.call : @basic_auth_token) end headers end @@ -94,7 +94,7 @@ def get_headers } unless @basic_auth_token.nil? headers["Authorization"] = - ((@basic_auth_token.is_a? Method) ? @basic_auth_token.call : @basic_auth_token) + (@basic_auth_token.is_a?(Method) ? @basic_auth_token.call : @basic_auth_token) end headers end diff --git a/seed/ruby-sdk/basic-auth/lib/requests.rb b/seed/ruby-sdk/basic-auth/lib/requests.rb index 64c8475c5b1..7e186119f6e 100644 --- a/seed/ruby-sdk/basic-auth/lib/requests.rb +++ b/seed/ruby-sdk/basic-auth/lib/requests.rb @@ -41,7 +41,7 @@ def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_basic_auth", "X-Fern-SDK-Version": "0.0.1" } unless @basic_auth_token.nil? headers["Authorization"] = - ((@basic_auth_token.is_a? Method) ? @basic_auth_token.call : @basic_auth_token) + (@basic_auth_token.is_a?(Method) ? @basic_auth_token.call : @basic_auth_token) end headers end @@ -84,7 +84,7 @@ def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_basic_auth", "X-Fern-SDK-Version": "0.0.1" } unless @basic_auth_token.nil? headers["Authorization"] = - ((@basic_auth_token.is_a? Method) ? @basic_auth_token.call : @basic_auth_token) + (@basic_auth_token.is_a?(Method) ? @basic_auth_token.call : @basic_auth_token) end headers end diff --git a/seed/ruby-sdk/bearer-token-environment-variable/lib/requests.rb b/seed/ruby-sdk/bearer-token-environment-variable/lib/requests.rb index 5fac6e937ca..aad047be45b 100644 --- a/seed/ruby-sdk/bearer-token-environment-variable/lib/requests.rb +++ b/seed/ruby-sdk/bearer-token-environment-variable/lib/requests.rb @@ -42,7 +42,7 @@ def get_headers "X-Fern-SDK-Name": "fern_bearer_token_environment_variable", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil? + headers["Authorization"] = (@api_key.is_a?(Method) ? @api_key.call : @api_key) unless @api_key.nil? headers end end @@ -85,7 +85,7 @@ def get_headers "X-Fern-SDK-Name": "fern_bearer_token_environment_variable", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil? + headers["Authorization"] = (@api_key.is_a?(Method) ? @api_key.call : @api_key) unless @api_key.nil? headers end end diff --git a/seed/ruby-sdk/custom-auth/lib/requests.rb b/seed/ruby-sdk/custom-auth/lib/requests.rb index ef4768f5209..e89062905f7 100644 --- a/seed/ruby-sdk/custom-auth/lib/requests.rb +++ b/seed/ruby-sdk/custom-auth/lib/requests.rb @@ -40,7 +40,7 @@ def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_custom_auth", "X-Fern-SDK-Version": "0.0.1" } unless @custom_auth_scheme.nil? headers["X-API-KEY"] = - ((@custom_auth_scheme.is_a? Method) ? @custom_auth_scheme.call : @custom_auth_scheme) + (@custom_auth_scheme.is_a?(Method) ? @custom_auth_scheme.call : @custom_auth_scheme) end headers end @@ -82,7 +82,7 @@ def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_custom_auth", "X-Fern-SDK-Version": "0.0.1" } unless @custom_auth_scheme.nil? headers["X-API-KEY"] = - ((@custom_auth_scheme.is_a? Method) ? @custom_auth_scheme.call : @custom_auth_scheme) + (@custom_auth_scheme.is_a?(Method) ? @custom_auth_scheme.call : @custom_auth_scheme) end headers end diff --git a/seed/ruby-sdk/examples/lib/requests.rb b/seed/ruby-sdk/examples/lib/requests.rb index 55854b05251..732c11c2d10 100644 --- a/seed/ruby-sdk/examples/lib/requests.rb +++ b/seed/ruby-sdk/examples/lib/requests.rb @@ -43,7 +43,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_examples", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -86,7 +86,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_examples", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/exhaustive/extra-deps/lib/requests.rb b/seed/ruby-sdk/exhaustive/extra-deps/lib/requests.rb index 169a4ce306f..94eba2bf232 100644 --- a/seed/ruby-sdk/exhaustive/extra-deps/lib/requests.rb +++ b/seed/ruby-sdk/exhaustive/extra-deps/lib/requests.rb @@ -38,7 +38,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_exhaustive", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -77,7 +77,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_exhaustive", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/exhaustive/flattened-module-structure/lib/requests.rb b/seed/ruby-sdk/exhaustive/flattened-module-structure/lib/requests.rb index 169a4ce306f..94eba2bf232 100644 --- a/seed/ruby-sdk/exhaustive/flattened-module-structure/lib/requests.rb +++ b/seed/ruby-sdk/exhaustive/flattened-module-structure/lib/requests.rb @@ -38,7 +38,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_exhaustive", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -77,7 +77,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_exhaustive", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/exhaustive/no-custom-config/lib/requests.rb b/seed/ruby-sdk/exhaustive/no-custom-config/lib/requests.rb index 169a4ce306f..94eba2bf232 100644 --- a/seed/ruby-sdk/exhaustive/no-custom-config/lib/requests.rb +++ b/seed/ruby-sdk/exhaustive/no-custom-config/lib/requests.rb @@ -38,7 +38,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_exhaustive", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -77,7 +77,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_exhaustive", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/grpc-proto-exhaustive/.mock/generators.yml b/seed/ruby-sdk/grpc-proto-exhaustive/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/ruby-sdk/grpc-proto-exhaustive/.mock/generators.yml +++ b/seed/ruby-sdk/grpc-proto-exhaustive/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/ruby-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml b/seed/ruby-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/ruby-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/ruby-sdk/grpc-proto-exhaustive/lib/environment.rb b/seed/ruby-sdk/grpc-proto-exhaustive/lib/environment.rb new file mode 100644 index 00000000000..d22f8c57f0d --- /dev/null +++ b/seed/ruby-sdk/grpc-proto-exhaustive/lib/environment.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +module SeedApiClient + class Environment + DEFAULT = "https://localhost" + end +end diff --git a/seed/ruby-sdk/grpc-proto-exhaustive/lib/fern_grpc_proto_exhaustive.rb b/seed/ruby-sdk/grpc-proto-exhaustive/lib/fern_grpc_proto_exhaustive.rb index e9cf4dc09e8..102b9913a3d 100644 --- a/seed/ruby-sdk/grpc-proto-exhaustive/lib/fern_grpc_proto_exhaustive.rb +++ b/seed/ruby-sdk/grpc-proto-exhaustive/lib/fern_grpc_proto_exhaustive.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require_relative "environment" require_relative "types_export" require_relative "requests" require_relative "fern_grpc_proto_exhaustive/dataservice/client" @@ -10,14 +11,19 @@ class Client attr_reader :dataservice # @param base_url [String] + # @param environment [SeedApiClient::Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] + # @param api_key [String] # @return [SeedApiClient::Client] - def initialize(base_url: nil, max_retries: nil, timeout_in_seconds: nil) + def initialize(api_key:, base_url: nil, environment: SeedApiClient::Environment::DEFAULT, max_retries: nil, + timeout_in_seconds: nil) @request_client = SeedApiClient::RequestClient.new( base_url: base_url, + environment: environment, max_retries: max_retries, - timeout_in_seconds: timeout_in_seconds + timeout_in_seconds: timeout_in_seconds, + api_key: api_key ) @dataservice = SeedApiClient::DataserviceClient.new(request_client: @request_client) end @@ -28,14 +34,19 @@ class AsyncClient attr_reader :dataservice # @param base_url [String] + # @param environment [SeedApiClient::Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] + # @param api_key [String] # @return [SeedApiClient::AsyncClient] - def initialize(base_url: nil, max_retries: nil, timeout_in_seconds: nil) + def initialize(api_key:, base_url: nil, environment: SeedApiClient::Environment::DEFAULT, max_retries: nil, + timeout_in_seconds: nil) @async_request_client = SeedApiClient::AsyncRequestClient.new( base_url: base_url, + environment: environment, max_retries: max_retries, - timeout_in_seconds: timeout_in_seconds + timeout_in_seconds: timeout_in_seconds, + api_key: api_key ) @dataservice = SeedApiClient::AsyncDataserviceClient.new(request_client: @async_request_client) end diff --git a/seed/ruby-sdk/grpc-proto-exhaustive/lib/fern_grpc_proto_exhaustive/dataservice/client.rb b/seed/ruby-sdk/grpc-proto-exhaustive/lib/fern_grpc_proto_exhaustive/dataservice/client.rb index 5f593e4c3ce..e303d2ecb84 100644 --- a/seed/ruby-sdk/grpc-proto-exhaustive/lib/fern_grpc_proto_exhaustive/dataservice/client.rb +++ b/seed/ruby-sdk/grpc-proto-exhaustive/lib/fern_grpc_proto_exhaustive/dataservice/client.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require_relative "../../requests" +require "json" require_relative "../types/column" require_relative "../types/upload_response" require_relative "../types/metadata" @@ -25,6 +26,35 @@ def initialize(request_client:) @request_client = request_client end + # @param request_options [SeedApiClient::RequestOptions] + # @return [Hash{String => Object}] + # @example + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) + # api.dataservice.foo + def foo(request_options: nil) + response = @request_client.conn.post do |req| + req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? + req.headers = { + **(req.headers || {}), + **@request_client.get_headers, + **(request_options&.additional_headers || {}) + }.compact + unless request_options.nil? || request_options&.additional_query_parameters.nil? + req.params = { **(request_options&.additional_query_parameters || {}) }.compact + end + unless request_options.nil? || request_options&.additional_body_parameters.nil? + req.body = { **(request_options&.additional_body_parameters || {}) }.compact + end + req.url "#{@request_client.get_url(request_options: request_options)}/foo" + end + JSON.parse(response.body) + end + # @param columns [Array] Request of type Array, as a Hash # * :id (String) # * :values (Array) @@ -36,11 +66,16 @@ def initialize(request_client:) # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::UploadResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.upload(columns: [{ id: "id", values: [1.1] }]) def upload(columns:, namespace: nil, request_options: nil) response = @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -66,11 +101,16 @@ def upload(columns:, namespace: nil, request_options: nil) # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::DeleteResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.delete def delete(ids: nil, delete_all: nil, namespace: nil, filter: nil, request_options: nil) response = @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -95,11 +135,16 @@ def delete(ids: nil, delete_all: nil, namespace: nil, filter: nil, request_optio # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::DescribeResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.describe def describe(filter: nil, request_options: nil) response = @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -119,11 +164,16 @@ def describe(filter: nil, request_options: nil) # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::FetchResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.fetch def fetch(ids: nil, namespace: nil, request_options: nil) response = @request_client.conn.get do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -149,11 +199,16 @@ def fetch(ids: nil, namespace: nil, request_options: nil) # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::ListResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.list def list(prefix: nil, limit: nil, pagination_token: nil, namespace: nil, request_options: nil) response = @request_client.conn.get do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -195,12 +250,17 @@ def list(prefix: nil, limit: nil, pagination_token: nil, namespace: nil, request # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::QueryResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.query(top_k: 1) def query(top_k:, namespace: nil, filter: nil, include_values: nil, include_metadata: nil, queries: nil, column: nil, id: nil, indexed_data: nil, request_options: nil) response = @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -236,11 +296,16 @@ def query(top_k:, namespace: nil, filter: nil, include_values: nil, include_meta # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::UpdateResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.update(id: "id") def update(id:, values: nil, set_metadata: nil, namespace: nil, indexed_data: nil, request_options: nil) response = @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -273,6 +338,38 @@ def initialize(request_client:) @request_client = request_client end + # @param request_options [SeedApiClient::RequestOptions] + # @return [Hash{String => Object}] + # @example + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) + # api.dataservice.foo + def foo(request_options: nil) + Async do + response = @request_client.conn.post do |req| + req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? + req.headers = { + **(req.headers || {}), + **@request_client.get_headers, + **(request_options&.additional_headers || {}) + }.compact + unless request_options.nil? || request_options&.additional_query_parameters.nil? + req.params = { **(request_options&.additional_query_parameters || {}) }.compact + end + unless request_options.nil? || request_options&.additional_body_parameters.nil? + req.body = { **(request_options&.additional_body_parameters || {}) }.compact + end + req.url "#{@request_client.get_url(request_options: request_options)}/foo" + end + parsed_json = JSON.parse(response.body) + parsed_json + end + end + # @param columns [Array] Request of type Array, as a Hash # * :id (String) # * :values (Array) @@ -284,12 +381,17 @@ def initialize(request_client:) # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::UploadResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.upload(columns: [{ id: "id", values: [1.1] }]) def upload(columns:, namespace: nil, request_options: nil) Async do response = @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -316,12 +418,17 @@ def upload(columns:, namespace: nil, request_options: nil) # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::DeleteResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.delete def delete(ids: nil, delete_all: nil, namespace: nil, filter: nil, request_options: nil) Async do response = @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -347,12 +454,17 @@ def delete(ids: nil, delete_all: nil, namespace: nil, filter: nil, request_optio # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::DescribeResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.describe def describe(filter: nil, request_options: nil) Async do response = @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -373,12 +485,17 @@ def describe(filter: nil, request_options: nil) # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::FetchResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.fetch def fetch(ids: nil, namespace: nil, request_options: nil) Async do response = @request_client.conn.get do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -405,12 +522,17 @@ def fetch(ids: nil, namespace: nil, request_options: nil) # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::ListResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.list def list(prefix: nil, limit: nil, pagination_token: nil, namespace: nil, request_options: nil) Async do response = @request_client.conn.get do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -453,13 +575,18 @@ def list(prefix: nil, limit: nil, pagination_token: nil, namespace: nil, request # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::QueryResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.query(top_k: 1) def query(top_k:, namespace: nil, filter: nil, include_values: nil, include_metadata: nil, queries: nil, column: nil, id: nil, indexed_data: nil, request_options: nil) Async do response = @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, @@ -496,12 +623,17 @@ def query(top_k:, namespace: nil, filter: nil, include_values: nil, include_meta # @param request_options [SeedApiClient::RequestOptions] # @return [SeedApiClient::UpdateResponse] # @example - # api = SeedApiClient::Client.new(base_url: "https://api.example.com") + # api = SeedApiClient::Client.new( + # base_url: "https://api.example.com", + # environment: SeedApiClient::Environment::DEFAULT, + # api_key: "YOUR_API_KEY" + # ) # api.dataservice.update(id: "id") def update(id:, values: nil, set_metadata: nil, namespace: nil, indexed_data: nil, request_options: nil) Async do response = @request_client.conn.post do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? + req.headers["X-API-Key"] = request_options.api_key unless request_options&.api_key.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, diff --git a/seed/ruby-sdk/grpc-proto-exhaustive/lib/requests.rb b/seed/ruby-sdk/grpc-proto-exhaustive/lib/requests.rb index e6adb4478dd..d181557796e 100644 --- a/seed/ruby-sdk/grpc-proto-exhaustive/lib/requests.rb +++ b/seed/ruby-sdk/grpc-proto-exhaustive/lib/requests.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require_relative "environment" require "faraday" require "faraday/retry" require "async/http/faraday" @@ -10,13 +11,22 @@ class RequestClient attr_reader :conn # @return [String] attr_reader :base_url + # @return [String] + attr_reader :api_key + # @return [String] + attr_reader :default_environment # @param base_url [String] + # @param environment [SeedApiClient::Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] + # @param api_key [String] # @return [SeedApiClient::RequestClient] - def initialize(base_url: nil, max_retries: nil, timeout_in_seconds: nil) - @base_url = base_url + def initialize(api_key:, base_url: nil, environment: SeedApiClient::Environment::DEFAULT, max_retries: nil, + timeout_in_seconds: nil) + @default_environment = environment + @base_url = environment || base_url + @api_key = api_key @conn = Faraday.new do |faraday| faraday.request :json faraday.response :raise_error, include_request: true @@ -28,16 +38,18 @@ def initialize(base_url: nil, max_retries: nil, timeout_in_seconds: nil) # @param request_options [SeedApiClient::RequestOptions] # @return [String] def get_url(request_options: nil) - request_options&.base_url || @base_url + request_options&.base_url || @default_environment || @base_url end # @return [Hash{String => String}] def get_headers - { + headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_grpc_proto_exhaustive", "X-Fern-SDK-Version": "0.0.1" } + headers["X-API-Key"] = (@api_key.is_a?(Method) ? @api_key.call : @api_key) unless @api_key.nil? + headers end end @@ -46,13 +58,22 @@ class AsyncRequestClient attr_reader :conn # @return [String] attr_reader :base_url + # @return [String] + attr_reader :api_key + # @return [String] + attr_reader :default_environment # @param base_url [String] + # @param environment [SeedApiClient::Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] + # @param api_key [String] # @return [SeedApiClient::AsyncRequestClient] - def initialize(base_url: nil, max_retries: nil, timeout_in_seconds: nil) - @base_url = base_url + def initialize(api_key:, base_url: nil, environment: SeedApiClient::Environment::DEFAULT, max_retries: nil, + timeout_in_seconds: nil) + @default_environment = environment + @base_url = environment || base_url + @api_key = api_key @conn = Faraday.new do |faraday| faraday.request :json faraday.response :raise_error, include_request: true @@ -65,16 +86,18 @@ def initialize(base_url: nil, max_retries: nil, timeout_in_seconds: nil) # @param request_options [SeedApiClient::RequestOptions] # @return [String] def get_url(request_options: nil) - request_options&.base_url || @base_url + request_options&.base_url || @default_environment || @base_url end # @return [Hash{String => String}] def get_headers - { + headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_grpc_proto_exhaustive", "X-Fern-SDK-Version": "0.0.1" } + headers["X-API-Key"] = (@api_key.is_a?(Method) ? @api_key.call : @api_key) unless @api_key.nil? + headers end end @@ -83,6 +106,8 @@ def get_headers class RequestOptions # @return [String] attr_reader :base_url + # @return [String] + attr_reader :api_key # @return [Hash{String => Object}] attr_reader :additional_headers # @return [Hash{String => Object}] @@ -93,14 +118,16 @@ class RequestOptions attr_reader :timeout_in_seconds # @param base_url [String] + # @param api_key [String] # @param additional_headers [Hash{String => Object}] # @param additional_query_parameters [Hash{String => Object}] # @param additional_body_parameters [Hash{String => Object}] # @param timeout_in_seconds [Long] # @return [SeedApiClient::RequestOptions] - def initialize(base_url: nil, additional_headers: nil, additional_query_parameters: nil, + def initialize(base_url: nil, api_key: nil, additional_headers: nil, additional_query_parameters: nil, additional_body_parameters: nil, timeout_in_seconds: nil) @base_url = base_url + @api_key = api_key @additional_headers = additional_headers @additional_query_parameters = additional_query_parameters @additional_body_parameters = additional_body_parameters @@ -113,6 +140,8 @@ def initialize(base_url: nil, additional_headers: nil, additional_query_paramete class IdempotencyRequestOptions # @return [String] attr_reader :base_url + # @return [String] + attr_reader :api_key # @return [Hash{String => Object}] attr_reader :additional_headers # @return [Hash{String => Object}] @@ -123,14 +152,16 @@ class IdempotencyRequestOptions attr_reader :timeout_in_seconds # @param base_url [String] + # @param api_key [String] # @param additional_headers [Hash{String => Object}] # @param additional_query_parameters [Hash{String => Object}] # @param additional_body_parameters [Hash{String => Object}] # @param timeout_in_seconds [Long] # @return [SeedApiClient::IdempotencyRequestOptions] - def initialize(base_url: nil, additional_headers: nil, additional_query_parameters: nil, + def initialize(base_url: nil, api_key: nil, additional_headers: nil, additional_query_parameters: nil, additional_body_parameters: nil, timeout_in_seconds: nil) @base_url = base_url + @api_key = api_key @additional_headers = additional_headers @additional_query_parameters = additional_query_parameters @additional_body_parameters = additional_body_parameters diff --git a/seed/ruby-sdk/grpc-proto-exhaustive/snippet.json b/seed/ruby-sdk/grpc-proto-exhaustive/snippet.json index 4512da57430..ebab85334d4 100644 --- a/seed/ruby-sdk/grpc-proto-exhaustive/snippet.json +++ b/seed/ruby-sdk/grpc-proto-exhaustive/snippet.json @@ -1,5 +1,16 @@ { "endpoints": [ + { + "id": { + "path": "/foo", + "method": "POST", + "identifierOverride": "endpoint_dataservice.foo" + }, + "snippet": { + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.foo", + "type": "ruby" + } + }, { "id": { "path": "/data", @@ -7,7 +18,7 @@ "identifierOverride": "endpoint_dataservice.upload" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.upload(columns: [{ id: \"id\", values: [1.1] }])", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.upload(columns: [{ id: \"id\", values: [1.1] }])", "type": "ruby" } }, @@ -18,7 +29,7 @@ "identifierOverride": "endpoint_dataservice.delete" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.delete", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.delete", "type": "ruby" } }, @@ -29,7 +40,7 @@ "identifierOverride": "endpoint_dataservice.describe" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.describe", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.describe", "type": "ruby" } }, @@ -40,7 +51,7 @@ "identifierOverride": "endpoint_dataservice.fetch" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.fetch", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.fetch", "type": "ruby" } }, @@ -51,7 +62,7 @@ "identifierOverride": "endpoint_dataservice.list" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.list", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.list", "type": "ruby" } }, @@ -62,7 +73,7 @@ "identifierOverride": "endpoint_dataservice.query" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.query(top_k: 1)", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.query(top_k: 1)", "type": "ruby" } }, @@ -73,7 +84,18 @@ "identifierOverride": "endpoint_dataservice.update" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.update(id: \"id\")", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.update(id: \"id\")", + "type": "ruby" + } + }, + { + "id": { + "path": "/foo", + "method": "POST", + "identifierOverride": "endpoint_dataservice.foo" + }, + "snippet": { + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.foo", "type": "ruby" } }, @@ -84,7 +106,7 @@ "identifierOverride": "endpoint_dataservice.upload" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.upload(columns: [{ id: \"id\", values: [1.1] }])", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.upload(columns: [{ id: \"id\", values: [1.1] }])", "type": "ruby" } }, @@ -95,7 +117,7 @@ "identifierOverride": "endpoint_dataservice.delete" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.delete", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.delete", "type": "ruby" } }, @@ -106,7 +128,7 @@ "identifierOverride": "endpoint_dataservice.describe" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.describe", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.describe", "type": "ruby" } }, @@ -117,7 +139,7 @@ "identifierOverride": "endpoint_dataservice.fetch" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.fetch", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.fetch", "type": "ruby" } }, @@ -128,7 +150,7 @@ "identifierOverride": "endpoint_dataservice.list" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.list", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.list", "type": "ruby" } }, @@ -139,7 +161,7 @@ "identifierOverride": "endpoint_dataservice.query" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.query(top_k: 1)", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.query(top_k: 1)", "type": "ruby" } }, @@ -150,7 +172,7 @@ "identifierOverride": "endpoint_dataservice.update" }, "snippet": { - "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(base_url: \"https://api.example.com\")\napi.dataservice.update(id: \"id\")", + "client": "require \"fern_grpc_proto_exhaustive\"\n\napi = SeedApiClient::Client.new(\n base_url: \"https://api.example.com\",\n environment: SeedApiClient::Environment::DEFAULT,\n api_key: \"YOUR_API_KEY\"\n)\napi.dataservice.update(id: \"id\")", "type": "ruby" } } diff --git a/seed/ruby-sdk/idempotency-headers/lib/requests.rb b/seed/ruby-sdk/idempotency-headers/lib/requests.rb index 2624a925af5..eb22dfc2450 100644 --- a/seed/ruby-sdk/idempotency-headers/lib/requests.rb +++ b/seed/ruby-sdk/idempotency-headers/lib/requests.rb @@ -42,7 +42,7 @@ def get_headers "X-Fern-SDK-Name": "fern_idempotency_headers", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -85,7 +85,7 @@ def get_headers "X-Fern-SDK-Name": "fern_idempotency_headers", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/imdb/lib/requests.rb b/seed/ruby-sdk/imdb/lib/requests.rb index 7d7a5483a6b..2bfe527ab18 100644 --- a/seed/ruby-sdk/imdb/lib/requests.rb +++ b/seed/ruby-sdk/imdb/lib/requests.rb @@ -38,7 +38,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_imdb", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -77,7 +77,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_imdb", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/multi-url-environment-no-default/lib/requests.rb b/seed/ruby-sdk/multi-url-environment-no-default/lib/requests.rb index 5bc93b9c056..8eebcedae93 100644 --- a/seed/ruby-sdk/multi-url-environment-no-default/lib/requests.rb +++ b/seed/ruby-sdk/multi-url-environment-no-default/lib/requests.rb @@ -47,7 +47,7 @@ def get_headers "X-Fern-SDK-Name": "fern_multi_url_environment_no_default", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -94,7 +94,7 @@ def get_headers "X-Fern-SDK-Name": "fern_multi_url_environment_no_default", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/multi-url-environment/lib/requests.rb b/seed/ruby-sdk/multi-url-environment/lib/requests.rb index 4fd227a5150..780a8a9d2ef 100644 --- a/seed/ruby-sdk/multi-url-environment/lib/requests.rb +++ b/seed/ruby-sdk/multi-url-environment/lib/requests.rb @@ -48,7 +48,7 @@ def get_headers "X-Fern-SDK-Name": "fern_multi_url_environment", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -96,7 +96,7 @@ def get_headers "X-Fern-SDK-Name": "fern_multi_url_environment", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/no-environment/lib/requests.rb b/seed/ruby-sdk/no-environment/lib/requests.rb index 25486ee3ff9..182e45d6111 100644 --- a/seed/ruby-sdk/no-environment/lib/requests.rb +++ b/seed/ruby-sdk/no-environment/lib/requests.rb @@ -38,7 +38,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_no_environment", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -77,7 +77,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_no_environment", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/oauth-client-credentials-default/lib/requests.rb b/seed/ruby-sdk/oauth-client-credentials-default/lib/requests.rb index 9d85a782ece..79ac655e970 100644 --- a/seed/ruby-sdk/oauth-client-credentials-default/lib/requests.rb +++ b/seed/ruby-sdk/oauth-client-credentials-default/lib/requests.rb @@ -42,7 +42,7 @@ def get_headers "X-Fern-SDK-Name": "fern_oauth_client_credentials_default", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -85,7 +85,7 @@ def get_headers "X-Fern-SDK-Name": "fern_oauth_client_credentials_default", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/oauth-client-credentials-environment-variables/lib/requests.rb b/seed/ruby-sdk/oauth-client-credentials-environment-variables/lib/requests.rb index e3f92478a06..ffcc711efff 100644 --- a/seed/ruby-sdk/oauth-client-credentials-environment-variables/lib/requests.rb +++ b/seed/ruby-sdk/oauth-client-credentials-environment-variables/lib/requests.rb @@ -42,7 +42,7 @@ def get_headers "X-Fern-SDK-Name": "fern_oauth_client_credentials_environment_variables", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -85,7 +85,7 @@ def get_headers "X-Fern-SDK-Name": "fern_oauth_client_credentials_environment_variables", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/oauth-client-credentials-nested-root/lib/requests.rb b/seed/ruby-sdk/oauth-client-credentials-nested-root/lib/requests.rb index b896b8132f6..5ebf719f78c 100644 --- a/seed/ruby-sdk/oauth-client-credentials-nested-root/lib/requests.rb +++ b/seed/ruby-sdk/oauth-client-credentials-nested-root/lib/requests.rb @@ -42,7 +42,7 @@ def get_headers "X-Fern-SDK-Name": "fern_oauth_client_credentials_nested_root", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -85,7 +85,7 @@ def get_headers "X-Fern-SDK-Name": "fern_oauth_client_credentials_nested_root", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/oauth-client-credentials/lib/requests.rb b/seed/ruby-sdk/oauth-client-credentials/lib/requests.rb index 8ba45142eca..9f4d2a46cc9 100644 --- a/seed/ruby-sdk/oauth-client-credentials/lib/requests.rb +++ b/seed/ruby-sdk/oauth-client-credentials/lib/requests.rb @@ -42,7 +42,7 @@ def get_headers "X-Fern-SDK-Name": "fern_oauth_client_credentials", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -85,7 +85,7 @@ def get_headers "X-Fern-SDK-Name": "fern_oauth_client_credentials", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/pagination/lib/requests.rb b/seed/ruby-sdk/pagination/lib/requests.rb index 7af3897c564..597e66d14ab 100644 --- a/seed/ruby-sdk/pagination/lib/requests.rb +++ b/seed/ruby-sdk/pagination/lib/requests.rb @@ -38,7 +38,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_pagination", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -77,7 +77,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_pagination", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/single-url-environment-default/lib/requests.rb b/seed/ruby-sdk/single-url-environment-default/lib/requests.rb index c67e0c9b273..c01c8cd55b0 100644 --- a/seed/ruby-sdk/single-url-environment-default/lib/requests.rb +++ b/seed/ruby-sdk/single-url-environment-default/lib/requests.rb @@ -48,7 +48,7 @@ def get_headers "X-Fern-SDK-Name": "fern_single_url_environment_default", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -96,7 +96,7 @@ def get_headers "X-Fern-SDK-Name": "fern_single_url_environment_default", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/single-url-environment-no-default/lib/requests.rb b/seed/ruby-sdk/single-url-environment-no-default/lib/requests.rb index f786ce2825f..695344a1d0f 100644 --- a/seed/ruby-sdk/single-url-environment-no-default/lib/requests.rb +++ b/seed/ruby-sdk/single-url-environment-no-default/lib/requests.rb @@ -47,7 +47,7 @@ def get_headers "X-Fern-SDK-Name": "fern_single_url_environment_no_default", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -94,7 +94,7 @@ def get_headers "X-Fern-SDK-Name": "fern_single_url_environment_no_default", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ruby-sdk/trace/lib/requests.rb b/seed/ruby-sdk/trace/lib/requests.rb index 9c9c5bf6d40..034ca567d58 100644 --- a/seed/ruby-sdk/trace/lib/requests.rb +++ b/seed/ruby-sdk/trace/lib/requests.rb @@ -47,7 +47,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_trace", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end @@ -94,7 +94,7 @@ def get_url(request_options: nil) # @return [Hash{String => String}] def get_headers headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_trace", "X-Fern-SDK-Version": "0.0.1" } - headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil? + headers["Authorization"] = (@token.is_a?(Method) ? @token.call : @token) unless @token.nil? headers end end diff --git a/seed/ts-sdk/grpc-proto-exhaustive/.mock/generators.yml b/seed/ts-sdk/grpc-proto-exhaustive/.mock/generators.yml index 972ed6d7b73..c23323621f2 100644 --- a/seed/ts-sdk/grpc-proto-exhaustive/.mock/generators.yml +++ b/seed/ts-sdk/grpc-proto-exhaustive/.mock/generators.yml @@ -1,6 +1,7 @@ api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file + - path: openapi/openapi.yml + - proto: + root: proto + target: proto/data/v1/data.proto + overrides: overrides.yml + local-generation: true diff --git a/seed/ts-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml b/seed/ts-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml new file mode 100644 index 00000000000..ebc23143df3 --- /dev/null +++ b/seed/ts-sdk/grpc-proto-exhaustive/.mock/openapi/openapi.yml @@ -0,0 +1,33 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + security: + - ApiKeyAuth: [] + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +security: + - ApiKeyAuth: [] +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-Key diff --git a/seed/ts-sdk/grpc-proto-exhaustive/README.md b/seed/ts-sdk/grpc-proto-exhaustive/README.md index 1d744ab0d4b..6afc2becf4d 100644 --- a/seed/ts-sdk/grpc-proto-exhaustive/README.md +++ b/seed/ts-sdk/grpc-proto-exhaustive/README.md @@ -20,17 +20,10 @@ A full reference for this library is available [here](./reference.md). Instantiate and use the client with the following: ```typescript -import { SeedApiClient, SeedApi } from "@fern/grpc-proto-exhaustive"; - -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); -await client.dataservice.upload({ - columns: [ - { - id: "id", - values: [1.1], - }, - ], -}); +import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; + +const client = new SeedApiClient({ apiKey: "YOUR_API_KEY" }); +await client.dataservice.foo(); ``` ## Request And Response Types @@ -55,7 +48,7 @@ will be thrown. import { SeedApiError } from "@fern/grpc-proto-exhaustive"; try { - await client.dataservice.upload(...); + await client.dataservice.foo(...); } catch (err) { if (err instanceof SeedApiError) { console.log(err.statusCode); @@ -82,7 +75,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret Use the `maxRetries` request option to configure this behavior. ```typescript -const response = await client.dataservice.upload(..., { +const response = await client.dataservice.foo(..., { maxRetries: 0 // override maxRetries at the request level }); ``` @@ -92,7 +85,7 @@ const response = await client.dataservice.upload(..., { The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior. ```typescript -const response = await client.dataservice.upload(..., { +const response = await client.dataservice.foo(..., { timeoutInSeconds: 30 // override timeout to 30s }); ``` @@ -103,7 +96,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa ```typescript const controller = new AbortController(); -const response = await client.dataservice.upload(..., { +const response = await client.dataservice.foo(..., { abortSignal: controller.signal }); controller.abort(); // aborts the request diff --git a/seed/ts-sdk/grpc-proto-exhaustive/reference.md b/seed/ts-sdk/grpc-proto-exhaustive/reference.md index 3c3c3ce64ee..74f0b1a937e 100644 --- a/seed/ts-sdk/grpc-proto-exhaustive/reference.md +++ b/seed/ts-sdk/grpc-proto-exhaustive/reference.md @@ -2,6 +2,46 @@ ## DataService +
client.dataservice.foo() -> Record +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.dataservice.foo(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Dataservice.RequestOptions` + +
+
+
+
+ +
+
+
+
client.dataservice.upload({ ...params }) -> SeedApi.UploadResponse
diff --git a/seed/ts-sdk/grpc-proto-exhaustive/resolved-snippet-templates.md b/seed/ts-sdk/grpc-proto-exhaustive/resolved-snippet-templates.md index 0b164384dfa..d8072715ed0 100644 --- a/seed/ts-sdk/grpc-proto-exhaustive/resolved-snippet-templates.md +++ b/seed/ts-sdk/grpc-proto-exhaustive/resolved-snippet-templates.md @@ -1,7 +1,25 @@ ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); +await client.dataservice.foo(); + +``` + + +```typescript +import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; + +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); +await client.dataservice.foo(); + +``` + + +```typescript +import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; + +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); await client.dataservice.upload({ columns: [ { @@ -16,7 +34,7 @@ await client.dataservice.upload({ ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); await client.dataservice.upload({ columns: [ { @@ -35,7 +53,7 @@ await client.dataservice.upload({ ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); undefined; ``` @@ -44,7 +62,7 @@ undefined; ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); await client.dataservice.delete({ ids: ["ids", "ids"], deleteAll: true, @@ -57,7 +75,7 @@ await client.dataservice.delete({ ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); undefined; ``` @@ -66,7 +84,7 @@ undefined; ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); undefined; ``` @@ -75,7 +93,7 @@ undefined; ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); undefined; ``` @@ -84,7 +102,7 @@ undefined; ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); await client.dataservice.fetch({ ids: "ids", namespace: "namespace", @@ -96,7 +114,7 @@ await client.dataservice.fetch({ ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); undefined; ``` @@ -105,7 +123,7 @@ undefined; ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); await client.dataservice.list({ prefix: "prefix", limit: 1, @@ -119,7 +137,7 @@ await client.dataservice.list({ ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); await client.dataservice.query({ topK: 1, }); @@ -130,7 +148,7 @@ await client.dataservice.query({ ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); await client.dataservice.query({ namespace: "namespace", topK: 1, @@ -168,7 +186,7 @@ await client.dataservice.query({ ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); await client.dataservice.update({ id: "id", }); @@ -179,7 +197,7 @@ await client.dataservice.update({ ```typescript import { SeedApiClient } from "@fern/grpc-proto-exhaustive"; -const client = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const client = new SeedApiClient({ apiKey: "YOUR_AUTHORIZATION" }); await client.dataservice.update({ id: "id", values: [1.1, 1.1], diff --git a/seed/ts-sdk/grpc-proto-exhaustive/snippet-templates.json b/seed/ts-sdk/grpc-proto-exhaustive/snippet-templates.json index b8618245ee0..e27fdcb4151 100644 --- a/seed/ts-sdk/grpc-proto-exhaustive/snippet-templates.json +++ b/seed/ts-sdk/grpc-proto-exhaustive/snippet-templates.json @@ -1,4 +1,65 @@ [ + { + "sdk": { + "package": "@fern/grpc-proto-exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/foo", + "method": "POST", + "identifierOverride": "endpoint_dataservice.foo" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "import { SeedApiClient } from \"@fern/grpc-proto-exhaustive\";" + ], + "templateString": "const client = new SeedApiClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "apiKey: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await client.dataservice.foo()", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [], + "type": "generic" + }, + "type": "v1" + } + }, { "sdk": { "package": "@fern/grpc-proto-exhaustive", @@ -28,9 +89,15 @@ { "value": { "imports": [], - "templateString": "environment: \"YOUR_BASE_URL\"", + "templateString": "apiKey: $FERN_INPUT", "isOptional": false, - "templateInputs": [], + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], "type": "generic" }, "type": "template" @@ -422,9 +489,15 @@ { "value": { "imports": [], - "templateString": "environment: \"YOUR_BASE_URL\"", + "templateString": "apiKey: $FERN_INPUT", "isOptional": false, - "templateInputs": [], + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], "type": "generic" }, "type": "template" @@ -726,9 +799,15 @@ { "value": { "imports": [], - "templateString": "environment: \"YOUR_BASE_URL\"", + "templateString": "apiKey: $FERN_INPUT", "isOptional": false, - "templateInputs": [], + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], "type": "generic" }, "type": "template" @@ -971,9 +1050,15 @@ { "value": { "imports": [], - "templateString": "environment: \"YOUR_BASE_URL\"", + "templateString": "apiKey: $FERN_INPUT", "isOptional": false, - "templateInputs": [], + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], "type": "generic" }, "type": "template" @@ -1071,9 +1156,15 @@ { "value": { "imports": [], - "templateString": "environment: \"YOUR_BASE_URL\"", + "templateString": "apiKey: $FERN_INPUT", "isOptional": false, - "templateInputs": [], + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], "type": "generic" }, "type": "template" @@ -1203,9 +1294,15 @@ { "value": { "imports": [], - "templateString": "environment: \"YOUR_BASE_URL\"", + "templateString": "apiKey: $FERN_INPUT", "isOptional": false, - "templateInputs": [], + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], "type": "generic" }, "type": "template" @@ -1947,9 +2044,15 @@ { "value": { "imports": [], - "templateString": "environment: \"YOUR_BASE_URL\"", + "templateString": "apiKey: $FERN_INPUT", "isOptional": false, - "templateInputs": [], + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], "type": "generic" }, "type": "template" diff --git a/seed/ts-sdk/grpc-proto-exhaustive/snippet.json b/seed/ts-sdk/grpc-proto-exhaustive/snippet.json index fb9f9f4d68b..6b90c262f8b 100644 --- a/seed/ts-sdk/grpc-proto-exhaustive/snippet.json +++ b/seed/ts-sdk/grpc-proto-exhaustive/snippet.json @@ -1,5 +1,16 @@ { "endpoints": [ + { + "id": { + "path": "/foo", + "method": "POST", + "identifier_override": "endpoint_dataservice.foo" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedApiClient } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ apiKey: \"YOUR_API_KEY\" });\nawait client.dataservice.foo();\n" + } + }, { "id": { "path": "/data", @@ -8,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait client.dataservice.upload({\n columns: [{\n id: \"id\",\n values: [1.1]\n }]\n});\n" + "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ apiKey: \"YOUR_API_KEY\" });\nawait client.dataservice.upload({\n columns: [{\n id: \"id\",\n values: [1.1]\n }]\n});\n" } }, { @@ -19,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait client.dataservice.delete();\n" + "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ apiKey: \"YOUR_API_KEY\" });\nawait client.dataservice.delete();\n" } }, { @@ -30,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait client.dataservice.describe();\n" + "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ apiKey: \"YOUR_API_KEY\" });\nawait client.dataservice.describe();\n" } }, { @@ -41,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait client.dataservice.fetch();\n" + "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ apiKey: \"YOUR_API_KEY\" });\nawait client.dataservice.fetch();\n" } }, { @@ -52,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait client.dataservice.list();\n" + "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ apiKey: \"YOUR_API_KEY\" });\nawait client.dataservice.list();\n" } }, { @@ -63,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait client.dataservice.query({\n topK: 1\n});\n" + "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ apiKey: \"YOUR_API_KEY\" });\nawait client.dataservice.query({\n topK: 1\n});\n" } }, { @@ -74,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait client.dataservice.update({\n id: \"id\"\n});\n" + "client": "import { SeedApiClient, SeedApi } from \"@fern/grpc-proto-exhaustive\";\n\nconst client = new SeedApiClient({ apiKey: \"YOUR_API_KEY\" });\nawait client.dataservice.update({\n id: \"id\"\n});\n" } } ], diff --git a/seed/ts-sdk/grpc-proto-exhaustive/src/Client.ts b/seed/ts-sdk/grpc-proto-exhaustive/src/Client.ts index 5e7e40b02de..f0ef236f969 100644 --- a/seed/ts-sdk/grpc-proto-exhaustive/src/Client.ts +++ b/seed/ts-sdk/grpc-proto-exhaustive/src/Client.ts @@ -2,12 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as environments from "./environments"; import * as core from "./core"; import { Dataservice } from "./api/resources/dataservice/client/Client"; export declare namespace SeedApiClient { interface Options { - environment: core.Supplier; + environment?: core.Supplier; + apiKey?: core.Supplier; } interface RequestOptions { @@ -21,7 +23,7 @@ export declare namespace SeedApiClient { } export class SeedApiClient { - constructor(protected readonly _options: SeedApiClient.Options) {} + constructor(protected readonly _options: SeedApiClient.Options = {}) {} protected _dataservice: Dataservice | undefined; diff --git a/seed/ts-sdk/grpc-proto-exhaustive/src/api/resources/dataservice/client/Client.ts b/seed/ts-sdk/grpc-proto-exhaustive/src/api/resources/dataservice/client/Client.ts index 353ee106b3a..f16218f86c9 100644 --- a/seed/ts-sdk/grpc-proto-exhaustive/src/api/resources/dataservice/client/Client.ts +++ b/seed/ts-sdk/grpc-proto-exhaustive/src/api/resources/dataservice/client/Client.ts @@ -2,15 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as SeedApi from "../../../index"; -import * as serializers from "../../../../serialization/index"; import urlJoin from "url-join"; +import * as serializers from "../../../../serialization/index"; import * as errors from "../../../../errors/index"; +import * as SeedApi from "../../../index"; export declare namespace Dataservice { interface Options { - environment: core.Supplier; + environment?: core.Supplier; + apiKey?: core.Supplier; } interface RequestOptions { @@ -24,7 +26,66 @@ export declare namespace Dataservice { } export class Dataservice { - constructor(protected readonly _options: Dataservice.Options) {} + constructor(protected readonly _options: Dataservice.Options = {}) {} + + /** + * @param {Dataservice.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.dataservice.foo() + */ + public async foo(requestOptions?: Dataservice.RequestOptions): Promise> { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.SeedApiEnvironment.Default, + "foo" + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/grpc-proto-exhaustive", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/grpc-proto-exhaustive/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.dataservice.foo.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedApiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedApiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedApiTimeoutError(); + case "unknown": + throw new errors.SeedApiError({ + message: _response.error.errorMessage, + }); + } + } /** * @param {SeedApi.UploadRequest} request @@ -43,7 +104,10 @@ export class Dataservice { requestOptions?: Dataservice.RequestOptions ): Promise { const _response = await core.fetcher({ - url: urlJoin(await core.Supplier.get(this._options.environment), "data"), + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.SeedApiEnvironment.Default, + "data" + ), method: "POST", headers: { "X-Fern-Language": "JavaScript", @@ -52,6 +116,7 @@ export class Dataservice { "User-Agent": "@fern/grpc-proto-exhaustive/0.0.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), }, contentType: "application/json", requestType: "json", @@ -103,7 +168,10 @@ export class Dataservice { requestOptions?: Dataservice.RequestOptions ): Promise { const _response = await core.fetcher({ - url: urlJoin(await core.Supplier.get(this._options.environment), "data/delete"), + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.SeedApiEnvironment.Default, + "data/delete" + ), method: "POST", headers: { "X-Fern-Language": "JavaScript", @@ -112,6 +180,7 @@ export class Dataservice { "User-Agent": "@fern/grpc-proto-exhaustive/0.0.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), }, contentType: "application/json", requestType: "json", @@ -163,7 +232,10 @@ export class Dataservice { requestOptions?: Dataservice.RequestOptions ): Promise { const _response = await core.fetcher({ - url: urlJoin(await core.Supplier.get(this._options.environment), "data/describe"), + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.SeedApiEnvironment.Default, + "data/describe" + ), method: "POST", headers: { "X-Fern-Language": "JavaScript", @@ -172,6 +244,7 @@ export class Dataservice { "User-Agent": "@fern/grpc-proto-exhaustive/0.0.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), }, contentType: "application/json", requestType: "json", @@ -237,7 +310,10 @@ export class Dataservice { } const _response = await core.fetcher({ - url: urlJoin(await core.Supplier.get(this._options.environment), "data/fetch"), + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.SeedApiEnvironment.Default, + "data/fetch" + ), method: "GET", headers: { "X-Fern-Language": "JavaScript", @@ -246,6 +322,7 @@ export class Dataservice { "User-Agent": "@fern/grpc-proto-exhaustive/0.0.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), }, contentType: "application/json", queryParameters: _queryParams, @@ -315,7 +392,10 @@ export class Dataservice { } const _response = await core.fetcher({ - url: urlJoin(await core.Supplier.get(this._options.environment), "data/list"), + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.SeedApiEnvironment.Default, + "data/list" + ), method: "GET", headers: { "X-Fern-Language": "JavaScript", @@ -324,6 +404,7 @@ export class Dataservice { "User-Agent": "@fern/grpc-proto-exhaustive/0.0.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), }, contentType: "application/json", queryParameters: _queryParams, @@ -377,7 +458,10 @@ export class Dataservice { requestOptions?: Dataservice.RequestOptions ): Promise { const _response = await core.fetcher({ - url: urlJoin(await core.Supplier.get(this._options.environment), "data/query"), + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.SeedApiEnvironment.Default, + "data/query" + ), method: "POST", headers: { "X-Fern-Language": "JavaScript", @@ -386,6 +470,7 @@ export class Dataservice { "User-Agent": "@fern/grpc-proto-exhaustive/0.0.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), }, contentType: "application/json", requestType: "json", @@ -439,7 +524,10 @@ export class Dataservice { requestOptions?: Dataservice.RequestOptions ): Promise { const _response = await core.fetcher({ - url: urlJoin(await core.Supplier.get(this._options.environment), "data/update"), + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.SeedApiEnvironment.Default, + "data/update" + ), method: "POST", headers: { "X-Fern-Language": "JavaScript", @@ -448,6 +536,7 @@ export class Dataservice { "User-Agent": "@fern/grpc-proto-exhaustive/0.0.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), }, contentType: "application/json", requestType: "json", @@ -486,4 +575,9 @@ export class Dataservice { }); } } + + protected async _getCustomAuthorizationHeaders() { + const apiKeyValue = await core.Supplier.get(this._options.apiKey); + return { "X-API-Key": apiKeyValue }; + } } diff --git a/seed/ts-sdk/grpc-proto-exhaustive/src/environments.ts b/seed/ts-sdk/grpc-proto-exhaustive/src/environments.ts new file mode 100644 index 00000000000..0cec2791589 --- /dev/null +++ b/seed/ts-sdk/grpc-proto-exhaustive/src/environments.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export const SeedApiEnvironment = { + Default: "https://localhost", +} as const; + +export type SeedApiEnvironment = typeof SeedApiEnvironment.Default; diff --git a/seed/ts-sdk/grpc-proto-exhaustive/src/index.ts b/seed/ts-sdk/grpc-proto-exhaustive/src/index.ts index bed9941cdaa..9157dadc454 100644 --- a/seed/ts-sdk/grpc-proto-exhaustive/src/index.ts +++ b/seed/ts-sdk/grpc-proto-exhaustive/src/index.ts @@ -1,3 +1,4 @@ export * as SeedApi from "./api"; export { SeedApiClient } from "./Client"; +export { SeedApiEnvironment } from "./environments"; export { SeedApiError, SeedApiTimeoutError } from "./errors"; diff --git a/seed/ts-sdk/grpc-proto-exhaustive/src/serialization/resources/dataservice/client/foo.ts b/seed/ts-sdk/grpc-proto-exhaustive/src/serialization/resources/dataservice/client/foo.ts new file mode 100644 index 00000000000..3bdfc81c307 --- /dev/null +++ b/seed/ts-sdk/grpc-proto-exhaustive/src/serialization/resources/dataservice/client/foo.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as core from "../../../../core"; + +export const Response: core.serialization.Schema< + serializers.dataservice.foo.Response.Raw, + Record +> = core.serialization.record(core.serialization.string(), core.serialization.unknown()); + +export declare namespace Response { + type Raw = Record; +} diff --git a/seed/ts-sdk/grpc-proto-exhaustive/src/serialization/resources/dataservice/client/index.ts b/seed/ts-sdk/grpc-proto-exhaustive/src/serialization/resources/dataservice/client/index.ts index 415726b7fea..734c128303e 100644 --- a/seed/ts-sdk/grpc-proto-exhaustive/src/serialization/resources/dataservice/client/index.ts +++ b/seed/ts-sdk/grpc-proto-exhaustive/src/serialization/resources/dataservice/client/index.ts @@ -1 +1,2 @@ +export * as foo from "./foo"; export * from "./requests"; diff --git a/test-definitions/fern/apis/grpc-proto-exhaustive/generators.yml b/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/generators.yml similarity index 100% rename from test-definitions/fern/apis/grpc-proto-exhaustive/generators.yml rename to test-definitions/fern/apis/csharp-grpc-proto-exhaustive/generators.yml diff --git a/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/openapi/openapi.yml b/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/openapi/openapi.yml new file mode 100644 index 00000000000..56ea165b773 --- /dev/null +++ b/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/openapi/openapi.yml @@ -0,0 +1,25 @@ +openapi: 3.0.3 +info: + title: Test API + version: 1.0.0 +servers: + - url: https://localhost +tags: + - name: dataservice +paths: + /foo: + post: + tag: dataservice + x-fern-sdk-group-name: + - dataservice + x-fern-sdk-method-name: foo + operationId: foo + responses: + "200": + content: + application/json: + schema: + type: object + +components: + securitySchemes: {} diff --git a/test-definitions/fern/apis/grpc-proto-exhaustive/overrides.yml b/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/overrides.yml similarity index 100% rename from test-definitions/fern/apis/grpc-proto-exhaustive/overrides.yml rename to test-definitions/fern/apis/csharp-grpc-proto-exhaustive/overrides.yml diff --git a/test-definitions/fern/apis/grpc-proto-exhaustive/proto/data/v1/data.proto b/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto similarity index 100% rename from test-definitions/fern/apis/grpc-proto-exhaustive/proto/data/v1/data.proto rename to test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto diff --git a/test-definitions/fern/apis/grpc-proto-exhaustive/proto/google/api/annotations.proto b/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/google/api/annotations.proto similarity index 100% rename from test-definitions/fern/apis/grpc-proto-exhaustive/proto/google/api/annotations.proto rename to test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/google/api/annotations.proto diff --git a/test-definitions/fern/apis/grpc-proto-exhaustive/proto/google/api/field_behavior.proto b/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/google/api/field_behavior.proto similarity index 100% rename from test-definitions/fern/apis/grpc-proto-exhaustive/proto/google/api/field_behavior.proto rename to test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/google/api/field_behavior.proto diff --git a/test-definitions/fern/apis/grpc-proto-exhaustive/proto/google/api/http.proto b/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/google/api/http.proto similarity index 100% rename from test-definitions/fern/apis/grpc-proto-exhaustive/proto/google/api/http.proto rename to test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/google/api/http.proto diff --git a/test-definitions/fern/apis/grpc-proto/generators.yml b/test-definitions/fern/apis/csharp-grpc-proto/generators.yml similarity index 100% rename from test-definitions/fern/apis/grpc-proto/generators.yml rename to test-definitions/fern/apis/csharp-grpc-proto/generators.yml diff --git a/test-definitions/fern/apis/grpc-proto/overrides.yml b/test-definitions/fern/apis/csharp-grpc-proto/overrides.yml similarity index 100% rename from test-definitions/fern/apis/grpc-proto/overrides.yml rename to test-definitions/fern/apis/csharp-grpc-proto/overrides.yml diff --git a/test-definitions/fern/apis/grpc-proto/proto/google/api/annotations.proto b/test-definitions/fern/apis/csharp-grpc-proto/proto/google/api/annotations.proto similarity index 100% rename from test-definitions/fern/apis/grpc-proto/proto/google/api/annotations.proto rename to test-definitions/fern/apis/csharp-grpc-proto/proto/google/api/annotations.proto diff --git a/test-definitions/fern/apis/grpc-proto/proto/google/api/http.proto b/test-definitions/fern/apis/csharp-grpc-proto/proto/google/api/http.proto similarity index 100% rename from test-definitions/fern/apis/grpc-proto/proto/google/api/http.proto rename to test-definitions/fern/apis/csharp-grpc-proto/proto/google/api/http.proto diff --git a/test-definitions/fern/apis/grpc-proto/proto/user/v1/user.proto b/test-definitions/fern/apis/csharp-grpc-proto/proto/user/v1/user.proto similarity index 100% rename from test-definitions/fern/apis/grpc-proto/proto/user/v1/user.proto rename to test-definitions/fern/apis/csharp-grpc-proto/proto/user/v1/user.proto