Skip to content

Is type SerializerCompiler correct ? #47

Closed
@remidewitte

Description

@remidewitte

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

Hello,

From my research, I have the feeling that the declared SerializerCompiler might be wrong.

In fastify, compiler is eventually called this way :

serializerCompiler({
    schema,
    method,
    url,
    httpStatus,
    contentType
  })

In fast-json-stringify-compiler; with jfsOpts being already bounded,

function responseSchemaCompiler (fjsOpts, { schema /* method, url, httpStatus */ }) { ... }

My conclusion is that SerializerCompiler should be:

export type SerializerCompiler = (routeDef : RouteDefinition) => Serializer;

What do you think ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions