SoapJS
  • SoapJS Framework
  • Clean Architecture
  • Quick Start
  • Components
    • Entity
    • Model
    • Repository
    • Collection
    • Mapper
    • Use Case
    • Controller
    • Route
    • RouteIO
    • Route Model
    • Router
    • Dependencies
    • Service
    • Toolset
  • Configuration
    • Introduction to Configuration Files
    • Plugin Configuration Structure Overview
    • Modifying Project Structure and Components
  • Examples
    • Simple API
    • Database Interaction Strategies
      • Using Where Conditions
      • Using QueryBuilder
      • Using Dedicated Repository Method
  • Plugins
    • Node.js
      • Soap Express
      • Soap AWS
      • Soap NestJS
      • Soap MongoDB
      • Soap Redis
      • Soap Mysql
    • Dart
      • Soap Dart
  • Troubleshooting and Support
  • Community and Contributions
  • Contact us
  • Sponsors / Partners
  • Release Notes
Powered by GitBook
On this page
  1. Components

Route Model

The Route Model shares the same characteristics as a regular model. The difference lies in the fact that route models, as the name suggests, are assigned to a specific Route and are generated during its creation. Route models related to a specific route should be contained within a single file in the directory where the route is located. Their use is limited to defining the contents of the request and response.

export type ProductRouteModel = {
  price: number,
  stock: number
}
PreviousRouteIONextRouter

Last updated 1 year ago