-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from samchon/feat/name
New plugin property `OpenApi.IOperation["x-samchon-accessor"]`.
- Loading branch information
Showing
10 changed files
with
7,733 additions
and
3,770 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...mposers/HttpMigrateApplicationComposer.ts → ...osers/migrate/HttpMigrateRouteComposer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { TestValidator } from "@nestia/e2e"; | ||
import { | ||
HttpMigration, | ||
IHttpMigrateApplication, | ||
IHttpMigrateRoute, | ||
OpenApi, | ||
} from "@samchon/openapi"; | ||
import fs from "fs"; | ||
|
||
import { TestGlobal } from "../../TestGlobal"; | ||
|
||
export const test_http_migrate_route_accessor = async (): Promise<void> => { | ||
const document: OpenApi.IDocument = OpenApi.convert( | ||
JSON.parse( | ||
await fs.promises.readFile( | ||
`${TestGlobal.ROOT}/examples/v3.1/shopping.json`, | ||
"utf8", | ||
), | ||
), | ||
); | ||
const application: IHttpMigrateApplication = | ||
HttpMigration.application(document); | ||
const route: IHttpMigrateRoute | undefined = application.routes.find( | ||
(r) => r.path === "/shoppings/sellers/sales" && r.method === "post", | ||
); | ||
TestValidator.equals("accessor")(route?.accessor.join("."))( | ||
"shoppings.sellers.sales.create", | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters