Skip to content

Simplify configuration options (URI and API version) #76

@luisquintanilla

Description

@luisquintanilla

When specifying the URI in ChromaConfigurationOptions, the value is sensitive to trailing slashes.

For example, this works:

var configOptions = new ChromaConfigurationOptions(uri: "http://localhost:8000/api/v1/");

This does not and returns a Not Found error. The only difference is the trailing slash.

var configOptions = new ChromaConfigurationOptions(uri: "http://localhost:8000/api/v1");

Looking at the OpenAPI docs, there's no trailing slash for the root path

Image

It'd be nice in configuration options if the only thing you specified as a user was the host and port. Since there are multiple versions of the API, you might also provide the version.

For example:

var configOptions = new ChromaConfigurationOptions(uri: "http://localhost:8000", version: ApiVersion.V1);

or

var configOptions = new ChromaConfigurationOptions(host: "localhost", port: 8000, version: ApiVersion.V1);

Internally, it would take care of forming the URI correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions