Skip to content

Commit

Permalink
(fix): dont generate empty OAuthScope values
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Apr 2, 2024
1 parent 3615eac commit 8713154
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/openapi-ir-to-fern/src/buildAuthSchemes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function buildAuthSchemes(context: OpenApiIrConverterContext): void {
context.builder.setAuth(BEARER_AUTH_SCHEME);
setAuth = true;
}
if (securityScheme.scopesEnum != null) {
if (securityScheme.scopesEnum != null && securityScheme.scopesEnum.values.length > 0) {
context.builder.addType(RelativeFilePath.of("__package__.yml"), {
name: "OauthScope",
schema: buildEnumTypeDeclaration(securityScheme.scopesEnum).schema
Expand Down

0 comments on commit 8713154

Please sign in to comment.