Skip to content

Simplify Concept API by replacing overridden, explicit etc. methods with parameters #170

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

Closed
alexjpwalker opened this issue Nov 21, 2022 · 1 comment

Comments

@alexjpwalker
Copy link
Member

Problem to Solve

We currently have a very large number of Concept API methods - and a lot of them feel like they should just be overloads rather than being separate methods. For example:

ThingType.GetOwns.Req thing_type_get_owns_req = 303;
ThingType.GetOwnsExplicit.Req thing_type_get_owns_explicit_req = 310;
ThingType.GetOwnsOverridden.Req thing_type_get_owns_overridden_req = 311;

Proposed Solution

In the example above, explicit and overridden should really be parameters - not methods in their own right. We should add them to ThingType.GetOwns.Req:

    message GetOwns {
        message Req {
            oneof filter {
                AttributeType.ValueType value_type = 1;
            }
            bool keys_only = 2;
            bool explicit_only = 3;
            bool overridden_only = 4;
        }
        message ResPart {
            repeated Type attribute_types = 1;
        }
    }

We can apply this same simplification to a great number of Concept API methods to bring down the total count.

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

No branches or pull requests

3 participants