TOML is good for config, but not for data exchange though. (Why would I need comments in a data exchange format? Comments are useful when you want to annotate some sample data for other developers who will consume or generate that data.)
Also, OpenAPI specs (also known colloquially as Swagger) can only be written in JSON or YAML.