Ejemplo n.º 1
0
    def get(self):
        http_specs = load_all_api_specs('wazo_auth.http', self.api_filename)
        external_auth_specs = load_all_api_specs('wazo_auth.external_auth',
                                                 self.api_filename)
        specs = chain(http_specs, external_auth_specs)

        api_spec = ChainMap(*specs)
        if not api_spec.get('info'):
            return {'error': "API spec does not exist"}, 404

        return make_response(yaml.dump(dict(api_spec)), 200,
                             {'Content-Type': 'application/x-yaml'})
Ejemplo n.º 2
0
    def get(self):
        api_spec = ChainMap(*load_all_api_specs('wazo_calld.plugins', self.api_filename))

        if not api_spec.get('info'):
            return {'error': "API spec does not exist"}, 404

        return make_response(yaml.dump(dict(api_spec)), 200, {'Content-Type': 'application/x-yaml'})