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

It would be great if the sysl endpoint definition could include constant values #94

Open
ghost opened this issue May 6, 2020 · 1 comment
Labels
enhancement New feature or request P1 Medium priority

Comments

@ghost
Copy link

ghost commented May 6, 2020

DCX has a few downstream endpoints which has URL vars and headers which are constant for the entire application. We would love to be able to mark up the sysl in some way to have the generated code use the constants instead of the service code having to manually populate those values.

example:


Downstream:
     /foo/{someid<:string}/xxx/{uuid<:string}/accounts/:
        GET (login_flag <: string [~header, ~required, name="LOGIN_FLAG"], channel_id <: string [~header, ~required, name="CHANNEL_ID"]:
            return ok <: FooDetails

I would like to tell sysl that the someid url var and the channel_id header are going to be constant values so they should not end up in the request struct and they should be hardcoded in the generated request.

@ghost ghost added enhancement New feature or request P1 Medium priority labels May 6, 2020
@anzdaddy
Copy link
Member

Supporting this should be fairly straightforward. We could allow calls of the form:

Downstream <- /foo/123/xxx/{uuid}/accounts/ (channel_id=456)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 Medium priority
Projects
None yet
Development

No branches or pull requests

1 participant