Giter Site home page Giter Site logo

Comments (5)

nechvatalp avatar nechvatalp commented on September 24, 2024 2

I attempted to fix this in the latest 7.1 release by providing by providing more variants of the methods each accepting different context.

I added such "overloads" for both Users and Groups, I was able to call create user successfully with that.

from azure-devops-go-api.

tmeckel avatar tmeckel commented on September 24, 2024 1

@tedchamb is it possible to change the signature of the CreateUser method as follows (making parameter args generic)?

func (client *ClientImpl) CreateUser(ctx context.Context, args interface{}) (*GraphUser, error) {

and then checking in the method body for valid struct types?

from azure-devops-go-api.

tedchamb avatar tedchamb commented on September 24, 2024

Thanks @tiwood , this is an issue where Go's lack of inheritance makes this difficult to address in the code generator. This is going to affect any method that accepts different subclasses as input. Fortunately there are not a lot of methods that fall into this category. I have a plan on how to fix this, but not sure when I will be able to get to it. Can you give me an idea of the priority of this particular issue for your application?

Thanks,
Ted

from azure-devops-go-api.

tedchamb avatar tedchamb commented on September 24, 2024

The GraphClient is meant to replace the IdentityClient, but the IdentityClient still works. Until this issue is fixed, you may want to try the CreateIdentity method on the IdentityClient.

from azure-devops-go-api.

tmeckel avatar tmeckel commented on September 24, 2024

The GraphClient is meant to replace the IdentityClient, but the IdentityClient still works. Until this issue is fixed, you may want to try the CreateIdentity method on the IdentityClient.

@tedchamb as we have the same issue with creating Groups via the Graph API I wanted to use the CreateGroups function from the Indentity API. The following structure must be passed as argument to CreateGroups

// Arguments for the CreateGroups function
type CreateGroupsArgs struct {
	// (required)
	Container interface{}
}

But because an interface{} is used as type for the Container struct element and there's no further description on this, I'm unable to use the CreateGroups method.

from azure-devops-go-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.