Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Collect problems that prevents a quick start #59

Closed
xepozz opened this issue Aug 30, 2020 · 3 comments
Closed

Collect problems that prevents a quick start #59

xepozz opened this issue Aug 30, 2020 · 3 comments

Comments

@xepozz
Copy link
Member

xepozz commented Aug 30, 2020

Need to collect the problems that prevent a quick start and try to solve them.
This package is small and may be released soon.

I see at least one problem now, see #58.

@romkatsu
Copy link
Member

  1. I really want to use a trait, but I need to make it return a custom exception. To register here and give the desired code.

  2. I want to have a demo, similar to yii-demo.

  3. I want to have application error handling out of the box(formatting)
    https://github.com/romkatsu/yii-api-demo/blob/master/src/Middleware/ExceptionMiddleware.php
    https://github.com/romkatsu/yii-api-demo/blob/master/src/NotFoundHandler.php

  4. I would like to have a single point for formatting api responses out of the box(structure of the response).
    https://github.com/romkatsu/yii-api-demo/blob/master/src/Formatter/ApiResponseFormatter.php

  5. Many are faced with the problem of cors. They have to watch and choose from third-party solutions. I think it would be easier if there was middleware out of the box.
    How to setup CORS in yii3 ? demo#110

Perhaps all these problems are solved by the demo application.

@samdark
Copy link
Member

samdark commented Sep 6, 2020

  1. Customizable request to entity mapping i.e. map request fields to Post form model.
  2. Customizable entity to response fileds mapping i.e. map Post to array of fields to serialize to JSON then.
  3. Paging / returning collection of entities.

@samdark
Copy link
Member

samdark commented Oct 4, 2020

@samdark samdark closed this as completed Dec 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants