Regex Suggestion Discovery For Web Concepts And Specs During API Design Time

I am working on taking the JSON feed of web concepts and specs and developing a simple website JavaScript tooltip library that API providers can employ to inject web literacy into their API developer portals and documentation. I have settled in on using an existing JavaScript tooltip library for the core functionality and have put some thought into a basic dictionary lookup that can be used in web and API literacy tooling.

As I was brainstorming on what is possible within a basic dictionary which could be used to map specific keywords and phrases to the web concepts and specs that Erik Wilde (@dret) has showcased in his work, it occurred to me that there should also be a regex layer to this dictionary lookup. I purposely left it out of my brainstorming on the dictionary, because I wanted to keep simple for usage within API portals and documentation, leaving my thoughts around how this could be applied wth in API design services and tooling, as well as potentially within IDEs (Atom, Visual Studio, Eclipse, etc.).

I am envisioning regular expressions that could be applied to data, text within API definitions like OpenAPI Spec and API Blueprint. When you are editing or have placed your cursor in a data field, a tooltip could pop up, or display in the help tooling with information about ISO 8601 or RFC 3339. When you are working with headers, as part of the API design process, information regarding HTTP headers could be auto-completed, and shown in tooltips and other help solutions.

In short, the basic dictionary would handle keywords and phrases, where the regex layer could be used for more structured considerations within the API design process. It would take time to build up a wealth of regular expressions that could be assigned to each available web concepts or spec, however once the heavy lifting is done, we would be injecting web literacy, and the common building blocks of the Internet earlier on in the API lifecycle, at design time, before things get too much more expensive down the road.