Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Some public API returns types have private subtypes, makes SDK hard to work with #71

Description

@sichan-vonage

Please update public API return types to not come from internal packages, as it make it impossible to mock. It's also kind of bad practice to be returning private data type on a public API as it makes it harder for people to work with and test etc.

for example type vonage.ApplicationResponse is exposed on the public API but contains subtypes application.ApplicationResponseKeys which is internal to the module. Therefore when I try to create my own type in my tests like so, I will get a compilation error.

vonage.ApplicationResponse{
	Id:   applicationID,
	Name: applicationName,
	Keys: application.ApplicationResponseKeys{
		PublicKey:  publicKeyString,
		PrivateKey: privateKeyString,
	},
}

the vonage package it self should also define it's own type ApplicationResponseKeys

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions