widdershins icon indicating copy to clipboard operation
widdershins copied to clipboard

How to remove erroneous Scope, Scope Description headings.

Open JManyama opened this issue 3 years ago • 4 comments

Hi All,

Could someone point me in the right direction to remove the erroneous Scope Scope description Table headings that appear at the top of some of my markdown files?

image

I can't seem to locate where this is coming from or how to have it left out of the conversion process.

Thanks.

JManyama avatar Jan 21 '21 15:01 JManyama

Can you share your input OpenAPI definition? This will be coming from security.def in the templates/openapi3 directory (which you can copy and then override using the --user_templates option.

It should only be being output if your securityScheme flows have non-empty scopes objects.

MikeRalphson avatar Jan 21 '21 16:01 MikeRalphson

Sure, attached is the security.def file in the copy of my templates folder: test-repo/src/api-explorer/templates/openapi3-copy/security.def

image

JManyama avatar Jan 21 '21 16:01 JManyama

You can remove this section if you want:

{{? flow.scopes && Object.keys(flow.scopes).length}}
|Scope|Scope Description|
|---|---|
{{ for (var sc in flow.scopes) { }}|{{=sc}}|{{=data.utils.join(flow.scopes[sc])}}|
{{ } /* of scopes */ }}
{{?}}

But, what does the securitySchemes section of your input OpenAPI definition look like?

MikeRalphson avatar Jan 21 '21 16:01 MikeRalphson

It didn't have a securitySchemes section, but there is a securityDefinitions section that looks like this:

image

In comparing this to the UI, would removing the "security":[{"Oauth2: []}] object also resolve this? Thanks again.

JManyama avatar Jan 21 '21 16:01 JManyama