Skip to content

How to walk routing #2257

Answered by RobinTail
JonathanCabezas asked this question in Q&A
Discussion options

You must be logged in to vote

To write a test to verify that my documentation has the right number of expected routes
I want to generate a ts file to have autocomplete on my routes

How about this, @JonathanCabezas ?

const documentation = new Documentation({
  routing,
  config,
  version: "1.2.3",
  title: "Example API",
  serverUrl: "https://example.com",
});

console.log(
  Object.keys(documentation.rootDoc.paths!)
);

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by RobinTail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants