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

OBPIH-4769 Add list endpoint in Product API #3489

Merged
merged 1 commit into from
Sep 23, 2022

Conversation

awalkowiak
Copy link
Collaborator

No description provided.

@awalkowiak awalkowiak merged commit ea8931d into feature/ui-redesign Sep 23, 2022
@awalkowiak awalkowiak deleted the OBPIH-4769 branch September 23, 2022 14:23
@@ -249,7 +249,20 @@ class BootStrap {


JSON.registerObjectMarshaller(Product) { Product product ->
return product.toJson()
[
Copy link
Member

Choose a reason for hiding this comment

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

Why are we moving these out of the Product class? I am trying to move all of these into the domain classes.

@@ -46,6 +46,35 @@ class UrlMappings {
controller = { "categoryApi" }
action = [GET: "read", POST: "save", PUT: "save", DELETE: "delete"]
}

// Category options for filters on product list page
"/api/categoryOptions"(parseRequest: true) {
Copy link
Member

Choose a reason for hiding this comment

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

Why not create their own APIs using the BaseDomainApiController? Or why not just use the generic API for these?


def products = productService.getProducts(category, catalogs, tags, includeInactive, params)

if (params.format == 'csv') {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need CSV handling on the API?

@@ -56,7 +93,7 @@ class ProductApiController extends BaseDomainApiController {
render([data: data] as JSON)
}

def list = {
def search = {
Copy link
Member

Choose a reason for hiding this comment

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

I think this might be a breaking change. The product API is already being used externally for things like the mobile app and other API clients so this might be a bad idea. In the future, please don't change existing endpoints unless we've had a discussion.

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.

None yet

2 participants