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

Robust HTTP processing capabilities (DP3) #1038

Closed
dhmlau opened this issue Feb 22, 2018 · 7 comments
Closed

Robust HTTP processing capabilities (DP3) #1038

dhmlau opened this issue Feb 22, 2018 · 7 comments
Assignees
Labels
epic REST Issues related to @loopback/rest package and REST transport in general

Comments

@dhmlau
Copy link
Member

dhmlau commented Feb 22, 2018

Based on discussion with @raymondfeng @kjdelisle:
We need robust HTTP processing capabilities to deal with HTTP layer policies

  • e.g. CORS, compression/decompression, content negotiation.

@raymondfeng 's initial investigation:

  • we don't want to take the burden to implement the HTTP stack.
  • base functionality from node core is not good enough
  • Possibility is:
    • to use Express base without routing plus the common middleware
    • or we can use Koa

DP3 scope

  • Must have: rework internals to use Express request/response types
  • Leverage CORS middleware instead of the current workaround (minimal refactoring)
  • HttpEndpointFactory - a new module to deal with HTTP(S) setup, a dependency of @loopback/rest
  • Stretch goal: serving OpenAPI spec document should be implemented in a controller method

Out of scope

  • Local API Explorer (Swagger UI) should be implemented using Express middleware
  • Expose Express to app developers, allow them to add custom middleware

Additional Information

Relevant: #180

@bajtos
Copy link
Member

bajtos commented May 16, 2018

Yesterday, we reviewed DP3 scope for this epic with @raymondfeng and @dhmlau and decided on the following feature set:

  • Must have: rework internals to use Express request/response types
  • Leverage CORS middleware instead of the current workaround (minimal refactoring)
  • HttpEndpointFactory - a new module to deal with HTTP(S) setup, a dependency of @loopback/rest
  • Stretch goal: serving OpenAPI spec document should be implemented in a controller method

@bajtos bajtos changed the title Robust HTTP processing capabilities Robust HTTP processing capabilities (DP3) May 16, 2018
@dhmlau
Copy link
Member Author

dhmlau commented May 16, 2018

Thanks @bajtos. Trying to map your list above to the tasks we have in this EPIC:

@bajtos
Copy link
Member

bajtos commented May 17, 2018

Must have: rework internals to use Express request/response types

This is mostly #1292 and #1326.

#436 IS NOT related.

Leverage CORS middleware instead of the current workaround (minimal refactoring)

I'd like to send a pull request today, I am not sure if we need a story.

HttpEndpointFactory - a new module to deal with HTTP(S) setup

This is tracked by #1331 with a follow-up in #430.

Stretch goal: serving OpenAPI spec document should be implemented in a controller method (#1332)

This is correct.

I added one more story to the epic - Blog post: Leveraging Express for a more robust HTTP processing #1337.

@bajtos
Copy link
Member

bajtos commented May 17, 2018

Leverage CORS middleware instead of the current workaround (minimal refactoring)

See #1338

@bajtos bajtos added the REST Issues related to @loopback/rest package and REST transport in general label May 17, 2018
@dhmlau
Copy link
Member Author

dhmlau commented May 24, 2018

ok. Summarize what we have here.

@hacksparrow @bajtos, does it look good to you?

@bajtos
Copy link
Member

bajtos commented May 28, 2018

@dhmlau LGTM 👍

@dhmlau
Copy link
Member Author

dhmlau commented Jul 16, 2018

Closing as done.

@dhmlau dhmlau closed this as completed Jul 16, 2018
@bajtos bajtos added the p1 label Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic REST Issues related to @loopback/rest package and REST transport in general
Projects
None yet
Development

No branches or pull requests

3 participants