diff --git a/CHANGELOG.md b/CHANGELOG.md index c10eb85..6cab652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +## [0.21.0] - 2022-04-06 + +### Changed + +- Updated reference to kiota libraries for deserialization simplification. + +## [0.20.0] - 2022-03-31 + +### Changed + +- Updated reference to kiota libraries that were moved to their own repository. + +## [0.0.17] - 2022-03-30 + +### Added + +- Added support for vendor specific content types +- Added support for 204 no content responses + +### Changed + +- Updated kiota libraries reference. + ## [0.0.16] - 2022-03-21 ### Changed diff --git a/README.md b/README.md index 773e789..5e0b613 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Get started with the Microsoft Graph Core SDK for Go by integrating the [Microso ```Shell go get github.com/microsoftgraph/msgraph-sdk-go-core go get github.com/Azure/azure-sdk-for-go/sdk/azidentity -go get github.com/microsoft/kiota/authentication/go/azure +go get github.com/microsoft/kiota-authentication-azure-go ``` ## 2. Getting started @@ -37,7 +37,7 @@ For an example of how to get an authentication provider, see [choose a Microsoft ```Golang import ( azidentity "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - a "github.com/microsoft/kiota/authentication/go/azure" + a "github.com/microsoft/kiota-authentication-azure-go" "context" ) @@ -85,7 +85,7 @@ After you have a **GraphRequestAdapterBase** that is authenticated, you can begi To retrieve the user's details ```Golang -import abs "github.com/microsoft/kiota/abstractions/go" +import abs "github.com/microsoft/kiota-abstractions-go" requestInf := abs.NewRequestInformation() targetUrl, err := url.Parse("https://graph.microsoft.com/v1.0/me") diff --git a/go.mod b/go.mod index 3cf76b6..c3b0b18 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,14 @@ go 1.17 require ( github.com/google/uuid v1.3.0 - github.com/microsoft/kiota/abstractions/go v0.0.0-20220321065327-ff9526eda23e - github.com/microsoft/kiota/http/go/nethttp v0.0.0-20220321065327-ff9526eda23e - github.com/microsoft/kiota/serialization/go/json v0.0.0-20220321065327-ff9526eda23e + github.com/microsoft/kiota-abstractions-go v0.2.0 + github.com/microsoft/kiota-http-go v0.1.0 + github.com/microsoft/kiota-serialization-json-go v0.2.0 github.com/stretchr/testify v1.7.1 ) require ( - github.com/cjlapao/common-go v0.0.18 // indirect + github.com/cjlapao/common-go v0.0.19 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/yosida95/uritemplate/v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 6c685c8..a69516f 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/cjlapao/common-go v0.0.18 h1:j6kT/0pmJ69HmUCs9LrCc7IWyxTOh2WYJyZMzUYTULs= -github.com/cjlapao/common-go v0.0.18/go.mod h1:zGdh2KmXnH4HTRfT7vPpY41cws776KULk44f09OPJgs= +github.com/cjlapao/common-go v0.0.19 h1:dhPllblgZwHn92u8wNleLDCg6+T2rjV57H8eyz82tbQ= +github.com/cjlapao/common-go v0.0.19/go.mod h1:EVLEXIxsBHblPMrhJYOvL4yBCcBj7IYDdW88VlfxpPM= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -20,25 +20,21 @@ github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/microsoft/kiota/abstractions/go v0.0.0-20220303111159-de55f78b58f1/go.mod h1:BUv5PFNuBLFXQlDtarjdgqdqDjee3FgfjrNkfZlA5us= -github.com/microsoft/kiota/abstractions/go v0.0.0-20220314101957-d2823fe62079/go.mod h1:BUv5PFNuBLFXQlDtarjdgqdqDjee3FgfjrNkfZlA5us= -github.com/microsoft/kiota/abstractions/go v0.0.0-20220315140630-e2d45e682974 h1:F4Wu/NIBftw5w9eLC7mgm0Drp5onIrj4gSvktWGYx6I= -github.com/microsoft/kiota/abstractions/go v0.0.0-20220315140630-e2d45e682974/go.mod h1:BUv5PFNuBLFXQlDtarjdgqdqDjee3FgfjrNkfZlA5us= -github.com/microsoft/kiota/abstractions/go v0.0.0-20220321065327-ff9526eda23e h1:jE5WOeg0pbfEkLL7XiZO/3FmS58+/8EKAlAvVTH3i/0= -github.com/microsoft/kiota/abstractions/go v0.0.0-20220321065327-ff9526eda23e/go.mod h1:ByVU/M0XlWTE0uflKWPv9Xrfrait2pcpMZSNGYM2nRc= -github.com/microsoft/kiota/http/go/nethttp v0.0.0-20220315140630-e2d45e682974 h1:1XE6rnzkwt8hVuMunLscDX24A3f2YL4Pmfp3h7JfUOI= -github.com/microsoft/kiota/http/go/nethttp v0.0.0-20220315140630-e2d45e682974/go.mod h1:xDoGoedJJQRvPZu8SJLe3lch9A/jptmz7+Aq9bV5BUw= -github.com/microsoft/kiota/http/go/nethttp v0.0.0-20220321065327-ff9526eda23e h1:qhOiirJSuO4KNLQnu5lF0A9QWQKhulREcVLagPNG+D8= -github.com/microsoft/kiota/http/go/nethttp v0.0.0-20220321065327-ff9526eda23e/go.mod h1:xDoGoedJJQRvPZu8SJLe3lch9A/jptmz7+Aq9bV5BUw= -github.com/microsoft/kiota/serialization/go/json v0.0.0-20220315140630-e2d45e682974 h1:T8l2SWrpddDOq001v8dOq8bNT8AILdk1u48dKiVzSPo= -github.com/microsoft/kiota/serialization/go/json v0.0.0-20220315140630-e2d45e682974/go.mod h1:Jtz7hHhcXIqLk4cVhv1+4sC8PKtEgu2qLeQawnRp0JU= -github.com/microsoft/kiota/serialization/go/json v0.0.0-20220321065327-ff9526eda23e h1:jIXm6Qr5ahCzFhxb4j5Ute0i/uS04pKM0Xes9Mt9FNM= -github.com/microsoft/kiota/serialization/go/json v0.0.0-20220321065327-ff9526eda23e/go.mod h1:Jtz7hHhcXIqLk4cVhv1+4sC8PKtEgu2qLeQawnRp0JU= +github.com/microsoft/kiota-abstractions-go v0.1.0/go.mod h1:72wco+cRPd6SJf6R2wjEQT/BzbpfCGJQ/MGJixj+AIM= +github.com/microsoft/kiota-abstractions-go v0.2.0 h1:5zg8SLQBUfAvg0wP6vH42k97pjCZ6sI5yBC7QOovsXM= +github.com/microsoft/kiota-abstractions-go v0.2.0/go.mod h1:72wco+cRPd6SJf6R2wjEQT/BzbpfCGJQ/MGJixj+AIM= +github.com/microsoft/kiota-http-go v0.1.0 h1:bpIQMfKHc6Gf2Yq0habBnlPF7jFgecRvgu1GDcAsnSI= +github.com/microsoft/kiota-http-go v0.1.0/go.mod h1:gRdOvtTMOPd9ad8hzwfranD3xdPsTpG6QEmC0HhibLs= +github.com/microsoft/kiota-serialization-json-go v0.1.0 h1:K+ykyYyYjC4yJ6CaKrJFzO5FUZZwat/jdux0DIeXzbA= +github.com/microsoft/kiota-serialization-json-go v0.1.0/go.mod h1:7wxGuNOHgu9TjUk/pQf6FAdweR/OX5p0DeR1sBjrixA= +github.com/microsoft/kiota-serialization-json-go v0.2.0 h1:K47w/RJDLWDN54Za+PlGJPUYPM/kWHMRvI5eNduibFA= +github.com/microsoft/kiota-serialization-json-go v0.2.0/go.mod h1:imCtF1b5htfZYhg9iZSc1mWrcyxgRi30+LPOL7rry+4= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/pascaldekloe/jwt v1.10.0/go.mod h1:TKhllgThT7TOP5rGr2zMLKEDZRAgJfBbtKyVeRsNB9A= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= diff --git a/graph_client_factory.go b/graph_client_factory.go index b7a6a4d..f942c5d 100644 --- a/graph_client_factory.go +++ b/graph_client_factory.go @@ -3,7 +3,7 @@ package msgraphgocore import ( nethttp "net/http" - khttp "github.com/microsoft/kiota/http/go/nethttp" + khttp "github.com/microsoft/kiota-http-go" ) // GetDefaultMiddlewaresWithOptions creates a default slice of middleware for the Graph Client. diff --git a/graph_odata_query_handler.go b/graph_odata_query_handler.go index 046884b..0fbef45 100644 --- a/graph_odata_query_handler.go +++ b/graph_odata_query_handler.go @@ -4,8 +4,8 @@ import ( nethttp "net/http" regexp "regexp" - abs "github.com/microsoft/kiota/abstractions/go" - khttp "github.com/microsoft/kiota/http/go/nethttp" + abs "github.com/microsoft/kiota-abstractions-go" + khttp "github.com/microsoft/kiota-http-go" ) // GraphODataQueryHandler is a handler that adds the dollar sign in front of OData query parameters diff --git a/graph_odata_query_handler_test.go b/graph_odata_query_handler_test.go index 7a3c806..16a1e1a 100644 --- a/graph_odata_query_handler_test.go +++ b/graph_odata_query_handler_test.go @@ -7,8 +7,8 @@ import ( "strings" testing "testing" - abs "github.com/microsoft/kiota/abstractions/go" - absauth "github.com/microsoft/kiota/abstractions/go/authentication" + abs "github.com/microsoft/kiota-abstractions-go" + absauth "github.com/microsoft/kiota-abstractions-go/authentication" assert "github.com/stretchr/testify/assert" ) diff --git a/graph_request_adapter_base.go b/graph_request_adapter_base.go index b6c8377..87af742 100644 --- a/graph_request_adapter_base.go +++ b/graph_request_adapter_base.go @@ -4,9 +4,9 @@ import ( "errors" nethttp "net/http" - absauth "github.com/microsoft/kiota/abstractions/go/authentication" - absser "github.com/microsoft/kiota/abstractions/go/serialization" - khttp "github.com/microsoft/kiota/http/go/nethttp" + absauth "github.com/microsoft/kiota-abstractions-go/authentication" + absser "github.com/microsoft/kiota-abstractions-go/serialization" + khttp "github.com/microsoft/kiota-http-go" ) // GraphRequestAdapterBase is the core service used by GraphServiceClient to make requests to Microsoft Graph. diff --git a/graph_telemetry_handler.go b/graph_telemetry_handler.go index 0bbb000..cf48774 100644 --- a/graph_telemetry_handler.go +++ b/graph_telemetry_handler.go @@ -6,7 +6,7 @@ import ( runtime "runtime" uuid "github.com/google/uuid" - khttp "github.com/microsoft/kiota/http/go/nethttp" + khttp "github.com/microsoft/kiota-http-go" ) // GraphTelemetryHandler is a middleware handler that adds telemetry headers to requests. diff --git a/internal/user.go b/internal/user.go index 28d402f..c7f3348 100644 --- a/internal/user.go +++ b/internal/user.go @@ -3,7 +3,7 @@ package internal import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" - i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55 "github.com/microsoft/kiota/abstractions/go/serialization" + i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55 "github.com/microsoft/kiota-abstractions-go/serialization" ) type User struct { @@ -47,9 +47,9 @@ func (m *DirectoryObject) GetDeletedDateTime() *i336074805fc853987abe6f7fe3ad97a } // GetFieldDeserializers the deserialization information for the current model -func (m *DirectoryObject) GetFieldDeserializers() map[string]func(interface{}, i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { +func (m *DirectoryObject) GetFieldDeserializers() map[string]func(i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { res := m.Entity.GetFieldDeserializers() - res["deletedDateTime"] = func(o interface{}, n i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { + res["deletedDateTime"] = func(n i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { val, err := n.GetTimeValue() if err != nil { return err @@ -121,9 +121,9 @@ func (m *Entity) GetId() *string { } // GetFieldDeserializers the deserialization information for the current model -func (m *Entity) GetFieldDeserializers() map[string]func(interface{}, i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { - res := make(map[string]func(interface{}, i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error) - res["id"] = func(o interface{}, n i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { +func (m *Entity) GetFieldDeserializers() map[string]func(i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { + res := make(map[string]func(i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error) + res["id"] = func(n i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err diff --git a/internal/user_response.go b/internal/user_response.go index 813c9ff..df60912 100644 --- a/internal/user_response.go +++ b/internal/user_response.go @@ -1,7 +1,7 @@ package internal import ( - i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55 "github.com/microsoft/kiota/abstractions/go/serialization" + i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55 "github.com/microsoft/kiota-abstractions-go/serialization" ) // UsersResponse @@ -49,9 +49,9 @@ func (m *UsersResponse) GetValue() []User { } // GetFieldDeserializers the deserialization information for the current model -func (m *UsersResponse) GetFieldDeserializers() map[string]func(interface{}, i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { - res := make(map[string]func(interface{}, i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error) - res["@odata.nextLink"] = func(o interface{}, n i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { +func (m *UsersResponse) GetFieldDeserializers() map[string]func(i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { + res := make(map[string]func(i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error) + res["@odata.nextLink"] = func(n i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err @@ -61,7 +61,7 @@ func (m *UsersResponse) GetFieldDeserializers() map[string]func(interface{}, i04 } return nil } - res["value"] = func(o interface{}, n i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { + res["value"] = func(n i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { val, err := n.GetCollectionOfObjectValues(func(pn i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) (i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.Parsable, error) { return NewUser(), nil }) diff --git a/page_iterator.go b/page_iterator.go index 80fd57a..e52a1e2 100644 --- a/page_iterator.go +++ b/page_iterator.go @@ -6,8 +6,8 @@ import ( "reflect" "unsafe" - abstractions "github.com/microsoft/kiota/abstractions/go" - "github.com/microsoft/kiota/abstractions/go/serialization" + abstractions "github.com/microsoft/kiota-abstractions-go" + "github.com/microsoft/kiota-abstractions-go/serialization" ) // PageIterator represents an iterator object that can be used to get subsequent pages of a collection. diff --git a/page_iterator_test.go b/page_iterator_test.go index 5cd26d0..b4d8d47 100644 --- a/page_iterator_test.go +++ b/page_iterator_test.go @@ -6,10 +6,10 @@ import ( httptest "net/http/httptest" testing "testing" - abstractions "github.com/microsoft/kiota/abstractions/go" - "github.com/microsoft/kiota/abstractions/go/authentication" - "github.com/microsoft/kiota/abstractions/go/serialization" - jsonserialization "github.com/microsoft/kiota/serialization/go/json" + abstractions "github.com/microsoft/kiota-abstractions-go" + "github.com/microsoft/kiota-abstractions-go/authentication" + "github.com/microsoft/kiota-abstractions-go/serialization" + jsonserialization "github.com/microsoft/kiota-serialization-json-go" "github.com/microsoftgraph/msgraph-sdk-go-core/internal" "github.com/stretchr/testify/assert" ) diff --git a/version.go b/version.go index 8d0e7d6..626e59c 100644 --- a/version.go +++ b/version.go @@ -1,3 +1,3 @@ package msgraphgocore -var CoreVersion = "0.0.16" +var CoreVersion = "0.20.0"