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

fix(operate): use post request for decision definitions and decision instances endpoints #263

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

huygur
Copy link
Contributor

@huygur huygur commented Sep 25, 2024

closes #262

DecisionInstance type should also include processInstanceKey, which is also addressed in this PR

Description of the change

[Describe your changes here]

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have opened this pull request against the alpha branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

[If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...]

@jwulf
Copy link
Member

jwulf commented Sep 26, 2024

Thanks for this. Can you open this against the alpha branch please. All code goes PR -> alpha -> main at the moment.

@huygur huygur changed the base branch from main to alpha September 26, 2024 05:43
@huygur
Copy link
Contributor Author

huygur commented Sep 26, 2024

@jwulf done 👍

@@ -40,6 +40,7 @@ export class DecisionInstance extends LosslessDto {
evaluationFailure!: string
@Int64String
processDefinitionKey!: string
processInstanceKey!: number
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a string, decorated with @Int64String.

Camunda 8 entity keys (such as processInstanceKey) are int64 in JSON and could be a value that cannot be accurately represented by the JS number type, so the Dtos enable lossless parsing with annotations - with the characteristic that C8 entity keys are strings in JS, rather than numbers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to know. I was wondering why the keys were all strings when Operate API specified them as numbers

@jwulf jwulf merged commit 0e5ab48 into alpha Sep 26, 2024
5 of 9 checks passed
@jwulf jwulf deleted the use-post-request-for-decisions branch September 26, 2024 09:29
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.

Decisions endpoints should make POST request instead of GET
2 participants