We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@tsed/socketio use own metadata storage. It's a problem because we cannot share the code to create SocketService with a Rest Controller.
@tsed/socketio
As is explained this discussion around Async API #1952, the new package should be able to generate the Async API Documentation.
The goal is to be able to declare both a Rest controller and a Websocket controller as follows:
class PetCategory { @Required() @Groups("!partial", "!create", "!update") id: string; @Required() @Example("doggie") name: string; } enum PetStatus { AVAILABLE = "available", PENDING = "pending", SOLD = "sold" } class Pet { @Required() @Groups("!partial", "!create", "!update") id: string; @Required() @Example("doggie") name: string; @Property() category: PetCategory; @CollectionOf(String) tags: string[]; @Enum(PetStatus) status: PetStatus; } @Controller("/") @Name("PetStore") class PetController { @Use("/") middleware(@PathParams("id") id: string) {} @Get("/:id") @Publish("pet.get") @Subscribe("pet.get") @Returns(200, Pet).Description("Returns a pet") @Returns(404) get(@PathParams("id") id: string) { return null; } @Get("/") @Publish("pet.getAll") @Subscribe("pet.getAll") @Returns(200, Array).Of(Pet).Description("Returns all pets") getAll() { return []; } @Patch("/:id") @Publish("pet.patch") @Subscribe("pet.updated") @Returns(200, Pet).Description("Returns a pet") @Returns(404) @Description("Patch a pet") patch(@PathParams("id") id: string, @BodyParams() @Partial() partial: Pet) { return null; } @Post("/:id") @Publish("pet.update") @Subscribe("pet.created") @Returns(200, Pet).Description("Returns a pet") @Returns(404) @Description("Update a pet") post(@BodyParams() @Groups("update") pet: Pet) { return null; } @Put("/") @Publish("pet.create") @Subscribe("pet.updated") @Returns(201, Pet) @Returns(404) @Description("Create a pet") put(@BodyParams() @Groups("create") pet: Pet) { return null; } @Delete("/:id") @Publish("pet.delete") @Subscribe("pet.deleted") @Returns(204) @Returns(404) @Description("Delete a pet") delete(@PathParams("id") id: string) { return null; } }
@Subscribe
@Publish
@tsed/schema
getSpec
@tsed/platform-routers
SUBSCRIBE
PUBLISH
@tsed/socketio-v2
@tsed/async-api-ui
@tsed/json-mapper
Context
The text was updated successfully, but these errors were encountered:
Romakita
No branches or pull requests
Is your feature request related to a problem? Please describe.
@tsed/socketio
use own metadata storage. It's a problem because we cannot share the code to create SocketService with a Rest Controller.Describe the solution you'd like
As is explained this discussion around Async API #1952, the new package should be able to generate the Async API Documentation.
The goal is to be able to declare both a Rest controller and a Websocket controller as follows:
Tasks
@Subscribe
and@Publish
decorator on@tsed/schema
package (PR: Feat socket io #186 )getSpec
function (`@tsed/schema) (PR: Feat socket io #186)@tsed/platform-routers
to filterSUBSCRIBE
andPUBLISH
verbs.@tsed/platform-routers
to be reused to generate layers for socket platform.@tsed/socketio-v2
package and add private tags on this package.@tsed/async-api-ui
package to generate doc and serve the Async API UI@tsed/platform-routers
to map WS Layers@tsed/socketio
packageAcceptance criteria
@tsed/schema
@tsed/json-mapper
Context
The text was updated successfully, but these errors were encountered: