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

Global serializer for HTTP results #37

Closed
ozziest opened this issue Jun 3, 2021 · 2 comments
Closed

Global serializer for HTTP results #37

ozziest opened this issue Jun 3, 2021 · 2 comments
Labels
enhancement New feature or request
Projects

Comments

@ozziest
Copy link
Member

ozziest commented Jun 3, 2021

Developers should be able to create a global serializer for HTTP responses. It will be greater general camelCase conventions.

Configuration

Config/Application.js

import { LOG_LEVEL } from "axe-api";

export default async () => {
  return {
    env: process.env.NODE_ENV,
    port: process.env.APP_PORT,
    logLevel: LOG_LEVEL.INFO,
    serializer: (result) => {
      // do something...
      return result;
    },
  };
};

Also, if developers want, they should be able to create handler-based serializers;

Config/Application.js

import { LOG_LEVEL } from "axe-api";

export default async () => {
  return {
    env: process.env.NODE_ENV,
    port: process.env.APP_PORT,
    logLevel: LOG_LEVEL.INFO,
    serializer: {
      PAGINATE: (result) => {
        // do something
        return result;
      },
    },
  };
};
@ozziest ozziest added the enhancement New feature or request label Jun 3, 2021
@ozziest ozziest added this to To do in v1.0.0 via automation Jun 3, 2021
saracalihan added a commit to saracalihan/axe-api that referenced this issue Sep 21, 2021
@ozziest ozziest moved this from To do to Pull Request in v1.0.0 Sep 22, 2021
ozziest pushed a commit that referenced this issue Oct 17, 2021
v1.0.0 automation moved this from Pull Request to Done! Oct 17, 2021
@ozziest ozziest moved this from Done! to Need Documentation in v1.0.0 Oct 17, 2021
@ozziest
Copy link
Member Author

ozziest commented Oct 17, 2021

@saracalihan , if you want, you can add the feature's documentation.

https://github.com/axe-api/docs

@saracalihan
Copy link
Member

@saracalihan , if you want, you can add the feature's documentation.

https://github.com/axe-api/docs

Okay, I will handle it

ozziest added a commit that referenced this issue Dec 24, 2022
ozziest added a commit that referenced this issue Dec 24, 2022
ozziest added a commit that referenced this issue Dec 24, 2022
@ozziest ozziest moved this from Need Documentation to Done! in v1.0.0 Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
v1.0.0
Done!
Development

No branches or pull requests

2 participants