Open yaronya opened 3 years ago
Can you proved some more infomation? Which methods are affected by this?
Btw, those types come directly from Bitbucket's API specification. If this is new a new issue, then they've probably changed something.
According to the bitbucket API this is the definition for type:
Base type for most resource objects. It defines the common type element that identifies an object's type. It also identifies the element as Swagger's discriminator.
Looking at some examples for creating repo's this is a simple as a repository has type repository
branch has branch
.
Hope this helps. I'm just starting out with this package and the "type" immediately confused me.
Here's an example I just tested an works:
await bitbucket.repositories.create({
workspace: 'xyz',
repo_slug: 'test',
_body: {
type: 'repository',
fork_policy: 'no_forks',
is_private: true,
scm: 'git',
},
});
It looks like the
type
field is configured as required under theObject
type (inbitbucket.d.ts
) so it also requires it for every PUT/POST method params type of the client. When adding that excess field, bitbucket fails the requests with aBad Request
validation error: