hackolade / OpenAPI

Hackolade(https://hackolade.com) plugin for OpenAPI 3 API documentation

Home Page:https://github.com/hackolade/OpenAPI/releases/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAPI Package.json - Name Does Not Match RegEx

ReallyMetro opened this issue · comments

I was on thin intellectual ice with my last issue and this one is thinner still, so I beg your indulgence.
But I cloned the OpenAPI Git project to a local repo. Then I pointed VSCode at it.
VSCode reported:
"String does not match the pattern of "^(?:@[a-z0-9-~][a-z0-9-.]*/)?[a-z0-9-][a-z0-9-.~]*$"."
on this bit of JSON:
"name": "OpenAPI",
I copy and pasted the RegEx into a RegEx web validation tool and it said: (https://regex101.com/)
"/ An unescaped delimiter must be escaped with a backslash ()"
RegEx 101 seems to thinks there is something wrong with the forward slash after the asterisk and before the right parenthesis.
VSCode thinks there is something wrong with "OpenAPI" based on the RegEx being right.
If I add the backslash escape recommended by RegEx101 it does not match the string "OpenAPI" in the tool.
I have no idea from where the RegEx originated and of course no idea how to fix it.
Is it self-inflicted? Was there a problem with the way I cloned the Git Project? Or is there something deeper?
Thanks!

The previous issue you raised was perfectly legitimate. No worries.

For this one... this plugin is not meant to be a VS Code plugin at all. It is only meant to work with our application https://hackolade.com/download.html The software's plugin manager will download the plugin and place it where necessary.

I'm sorry but you seem to have misunderstood me. I wasn't trying to use the plug-in in VSCode. That would truly be stupid.

I was trying to use VSCode as a development environment with the goal writing a custom plug-in for Hackolade.
As a dev environment VSCode was reporting an error on the code that it saw in front of it, that came directly from GitHub.
VSCode has good markdown support and helped me find those two problem .pngs
VSCode can also edit JSON files. So until shown to be wrong, I believe it is an appropriate choice for this purpose.
I realise now that the adapters are built nearly entirely of JSON. So I have learned something as well using VSCode.
In the packaging of the JSON for Git, some RegEx was used to validate the name of the package.
I have tried to use two sources to verify that there is some problem and try and find where the problem might be.

My issue seems to boil down to:
"Can you fix the RegEx, and if in your opinion it is not broken, can you provide guidance on how should I approach fixing the RegEx?"

OK. I might have figured it out.
The RegEx doesn't tolerate UpperCase whereas the branding of OpenAPI demands it.
You are faced with comply with technical rules of Brand Identification, and the latter won.