Use swagger API to connect server and client side in meteor application

I’m trying to use swagger API as a connector between Client side and Server Side in my meteor application. I’m trying to do this because then I can use this as a connector to connect mobile application and other third-party applications to my app. I chose swagger because it has all tool that I need and also because of the security.
Is this approach good for what I’m trying to achieve?

You definetely can go that way, but then you don’t need meteor that much since you could be good by just having a node + express server giving access to your REST endpoints and some lib in the frontend to call those endpoints (even good old jQuery).

The main advantages of using meteor methods/publications over REST endpoints are that you can directly call them from the client and get things like reactivity and optimistic UI for free. Also by using something like you can get classic REST endpoints for all your methods and CRUD operations on your database with no effort.

Another league is to use a graphQL server and learn how their queries work instead of REST endpoints, it’s more complex(especially at the beginning) but the queries are much more flexible ,you get data validation, multiple data sources, data joins, etc.

Out of the 3 possibilities I would only recommend going for REST endpoints (swagger API) if you don’t need realtime updates or optimistic UI, and you don’t have to create too many of them. Otherwise I would go for meteor methods/publications (if you need realtime updates on the UI or a lot of endpoints) or graphQL (if you need complex queries with different data sources)