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

Allow HTTP header contents to be marked as required #65

Open
gkanz opened this issue Apr 2, 2020 · 2 comments
Open

Allow HTTP header contents to be marked as required #65

gkanz opened this issue Apr 2, 2020 · 2 comments
Labels
P1 Medium priority

Comments

@gkanz
Copy link
Contributor

gkanz commented Apr 2, 2020

Currently headers can be marked as ~required parameters in Sysl end points, but their contents can not be.

Current syntax and behaviour:

contentType <: string [~required, name="Content-Type"]

svc_client.sysl will check that the header is present in the request passed to it.

Proposed syntax and behaviour:

contentType <: string [~required, name="Content-Type", value="application/json"]

svc_client.sysl will check that the header is present in the request passed to it then:

  • if it is present, check the value.
  • if it is not present and required; add the header.
  • if is not present and not required; no action.
@gkanz
Copy link
Contributor Author

gkanz commented Apr 3, 2020

Duplicate of anz-bank/sysl#545

@gkanz gkanz marked this as a duplicate of anz-bank/sysl#545 Apr 3, 2020
@gkanz
Copy link
Contributor Author

gkanz commented Apr 3, 2020

Not sure my proposal is great given that this will be on every endpoint for a given app. Should probably be an app-level attribute.

@ChloePlanet ChloePlanet added the P1 Medium priority label Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants