Skip to content

Concept Insights: fix corpus id in createCorpus #66

@msushkov

Description

@msushkov

Concept Insights API requires corpus id to be of the form /corpora/{account_id}/{corpus}. createCorpus() takes in a Corpus object, where an id is required. createCorpus() creates a URL for the request by concatenating /v2/corpora/{account_id} and the id from the Corpus object; currently this concatenation results in /v2/corpora/{account_id}/corpora/{account_id}/corpus.

Proposed solution: since Concept Insights API does not require an id for the corpus, allow Corpus.id to be null in createCorpus(). Add a name field to Corpus and use that when calling createCorpusIdPath() from createCorpus().

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions