Comments (7)
@earth2marsh These are the Regular Expressions that decides oauth2
is two tokens, a string
token and a constant
token:
- String https://github.com/ajaxorg/ace/blob/4d868a046ad9ad6352465b216d44fcb4df17df79/lib/ace/mode/yaml_highlight_rules.js#L72
- Number https://github.com/ajaxorg/ace/blob/4d868a046ad9ad6352465b216d44fcb4df17df79/lib/ace/mode/yaml_highlight_rules.js#L81
Try changing those regex on your build and see if you can make that accept oauth2
is one string token.
These lines of code could be found at mode-yaml.js
file in this app
from swagger-editor.
OK, here is a refiddle: http://refiddle.com/refiddles/536d185075622d7b97cb0100
I've updated line 81 of mode-yaml.js in the app, but I'm not seeing the change. Is there something special I need to do to rebuild it?
from swagger-editor.
Correction, it's line 129 in mode-yaml.js. The new pattern should be:
/[+\-]{1}?[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?\b/
from swagger-editor.
@earth2marsh my bad, we are using the minified files of ace.
Try changing this
/bower_components/ace-builds/src-min-noconflict/mode-yaml.js
It doesn't worth setting up Ace build system. editing minified code is hard but it's just a try :)
from swagger-editor.
@earth2marsh also, the regexs are cascading, the later they come in the array, the more powerful they are.
from swagger-editor.
@mohsen1 great, that worked! But that asset is part of gitignore. Do I commit it anyway?
And should I submit it as a merge request back to ACE?
from swagger-editor.
fixed by 73fdc92
from swagger-editor.
Related Issues (20)
- suggestion: Should alert the user if generate client/server with empty content in the editor
- Generate Python code compatible with Connexion 3.0.1 HOT 1
- duplicate imports on generated models in typescript-axios exported files HOT 4
- Generated client -> html -> index.html - doesn't format code blocks to wrap long http responses
- Editor freezes when having circular $ref in schemas
- Timeout using massive open api definition
- Swagger editor allows to define object with required attributes and no definition
- Callback reference imaginary error with OpenAPI 3.1
- SwaggerEditor@next: Integration [email protected] and enhance OpenAPI 2.0 experience HOT 1
- SwaggerEditor@next: Integration of latest [email protected] HOT 1
- SwaggerEditor@next: integration latest [email protected] and React@18 in backward compatible way HOT 1
- Console error when changing swagger key in Swagger 2.0 spec HOT 2
- SwaggerEditor@4: integrate [email protected] with React@18 HOT 2
- Swagger editor converter fails to convert nested properties from 2.0 to 3.x
- react-transition-group package no longer works with React@18 HOT 3
- Client HTML2 doesn't have parameters' defaults
- SwaggerEditor@next: validation table headers are not aligned properly
- SwaggerEditor@next: Add Google Analytics for SB hosted editor
- Swagger Editor Incorrectly Renders Examples for `deepObject` `explode:true` Parameters
- Swagger Editor show Structural error at openapi for 3.1.0 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swagger-editor.