Skip to content

Commit

Permalink
Merge branch 'main' into ft-batch-requests-microsoftgraph#11
Browse files Browse the repository at this point in the history
  • Loading branch information
jobala authored Apr 6, 2022
2 parents defd445 + 86b5768 commit 79f3124
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 50 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
)

Expand Down Expand Up @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 12 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
Expand All @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion graph_client_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions graph_odata_query_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions graph_odata_query_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
6 changes: 3 additions & 3 deletions graph_request_adapter_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion graph_telemetry_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions internal/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions internal/user_response.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package internal

import (
i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55 "github.com/microsoft/kiota/abstractions/go/serialization"
i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55 "github.com/microsoft/kiota-abstractions-go/serialization"
)

// UsersResponse
Expand Down Expand Up @@ -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
Expand All @@ -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
})
Expand Down
4 changes: 2 additions & 2 deletions page_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions page_iterator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package msgraphgocore

var CoreVersion = "0.0.16"
var CoreVersion = "0.20.0"

0 comments on commit 79f3124

Please sign in to comment.