The SPEC_FORMAT config was re-added via #66. To keep the inconsistency, the spec route should also use the value of SPEC_FORMAT.
Currently, the format will be decided based on the spec path. For example, if the spec path is foo.json, then the JSON format will be used, while the YAML will be used if the spec path is foo.yaml. This behavior will be removed in 0.7.0, now the format should be set explicitly with the SPEC_FORMAT` config.