Mermade / widdershins

OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown

Home Page:https://mermade.github.io/reslate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to remove erroneous Scope, Scope Description headings.

JManyama opened this issue · 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.

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.

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

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?

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.