-
Notifications
You must be signed in to change notification settings - Fork 414
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
[759]Create webhook #822
[759]Create webhook #822
Conversation
1272e4a
to
c6df056
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you refer to the implementation of other services that are using ApiClientService.ts ?
webhook/pom.xml
Outdated
<groupId>org.mapstruct</groupId> | ||
<artifactId>mapstruct</artifactId> | ||
<version>1.6.0.Beta1</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already defined mapstruct in parent pom.xml with version 1.4.1.Final. Why do you need another version here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, I removed it
public static final String EVENT_URL = "/backoffice/events"; | ||
|
||
public static final String CODE_200 = "200"; | ||
public static final String OK = "Ok"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use org.springframework.http.HttpStatus instead of defining these constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the ApiConstant.CODE_200
is using in the value of annotation. And they don't accept the enum value like HttpStatus.OK.value()
paths: | ||
- "webhook/**" | ||
- ".github/workflows/actions/action.yaml" | ||
- ".github/workflows/webhook-ci.yaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add - "pom.xml"
.github/workflows/webhook-ci.yaml
Outdated
- "webhook/**" | ||
- ".github/workflows/actions/action.yaml" | ||
- ".github/workflows/webhook-ci.yaml" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add - "pom.xml",
ErrorVm errorVm = new ErrorVm(HttpStatus.BAD_REQUEST.toString(), | ||
HttpStatus.BAD_REQUEST.getReasonPhrase(), e.getMessage()); | ||
return ResponseEntity.badRequest().body(errorVm); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add handling 500 as https://github.com/nashtech-garage/yas/pull/808/files
Quality Gate passed for 'storefront-bff'Issues Measures |
Quality Gate passed for 'backoffice-bff'Issues Measures |
Quality Gate passed for 'tax'Issues Measures |
Quality Gate passed for 'payment'Issues Measures |
Quality Gate passed for 'media'Issues Measures |
Quality Gate passed for 'location'Issues Measures |
Quality Gate passed for 'search'Issues Measures |
Quality Gate passed for 'payment-paypal'Issues Measures |
Quality Gate passed for 'customer'Issues Measures |
Quality Gate passed for 'yas'Issues Measures |
Quality Gate passed for 'product'Issues Measures |
Quality Gate passed for 'order'Issues Measures |
Quality Gate passed for 'rating'Issues Measures |
Quality Gate passed for 'backoffice'Issues Measures |
Quality Gate passed for 'promotion'Issues Measures |
Quality Gate passed for 'inventory'Issues Measures |
No description provided.