Convert HTTP migration application from OpenAPI document.

HttpMigration.application() is a function converting the OpenAPI document and its operations to the HTTP migration application.

The HTTP migration application is designed for helping the OpenAPI generator libraries, which converts OpenAPI operations to an RPC (Remote Procedure Call) function. To support the OpenAPI generator libraries, IHttpMigrateRoute takes below normalization rules:

  • Path parameters are separated to atomic level.
  • Query parameters are binded into one object.
  • Header parameters are binded into one object.
  • Allow only below HTTP methods
    • head
    • get
    • post
    • put
    • patch
    • delete
  • Allow only below content media types
    • application/json
    • application/x-www-form-urlencoded
    • multipart/form-data
    • text/plain

If there're some API operations which canont adjust the above rules or there're some logically insensible, these operation would be failed to migrate and registered into the IHttpMigrateApplication.errors.