Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(wadm-types): simplify results WIP #538

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

markkovari
Copy link
Contributor

@markkovari markkovari commented Jan 5, 2025

Feature or Problem

resolves: #534

By

This would mean changing PutResult to have Error and Success (with a message for the new version)

if I understand correctly we want to reduce the tagged unions top level fields only, right?
Not sure which is better here, if the Success value has an Option<String> only or if there is an other enum, which has two different values.

And another question: should this change modifyPutModelResponses message field in any way?

a. version a (here the optional "message" is not really descriptive, but pretty much the same the other version)

pub enum PutResult {
    Success(Option<String>),
    Error,
}

b. version b

pub enum PutResultSuccess {
    Created,
    NewVersion(String),
}

pub enum PutResult {
    Success(PutResultSuccess),
    Error,
}

not sure which is more clear. 🤔
Before going and implementing it all the way through I would rather ask a for a quick feedback.

Thanks

p.s.: please ignore the other changes for now, just wanted to make things faster

Related Issues

Release Information

Consumer Impact

Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

@markkovari markkovari force-pushed the ref/wadm/unify-result-enum-shapes branch from 4e386d4 to bbf5445 Compare January 5, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] standardize wadm API response enums
1 participant