Angular中的OpenApi-Generator typescript-angular pass api键

问题描述

我找不到或找不到任何有关如何将API密钥传递给openapi-generator生成的API客户端的文档。我的API定义在查询参数中包含apiKey:

components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: query
      name: code

我认为它可能像这样工作:

export function getApiConfig(): Configuration {
  return new Configuration({
      basePath: environment.apiBasePath,apiKeys: { 
        code: 'my-api-key'
      }
  });
}

因为openapi-generator生成的配置类型包括一个apiKeys-Array,但是它不起作用。如果我理解正确,文档会说不支持ApiKeys。我该如何解决?我可以以某种方式手动传递查询参数吗?还是实际上受支持?

docs

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)