Comments (9)
@handrews thanks for providing some background on the state of things--I totally understand Real Life. I'm going to try to make a new template with the draft-07
, and I'll hit up the slack for any issues that come up. Thanks again and best of luck with Real Life.
from json-schema-tools.
Ah, I had assumed that the warnings were the reason that there was no CSS! I'll check back later.
Nice project by the way!
from json-schema-tools.
@rscreene I had an email notification that you maybe had an old version lying around- I don't see that comment here so I assume you checked and you do not?
I remember the "Context can't use RegExps with the 'g' or 'y' flags" warning but I was pretty sure that I'd fixed that. Hm....
The result is definitely very minimally styled. Per the doca workspace README:
For now, it simply displays the getting started text and the processed schemas. We will be gradually making this into a proper theme, but it can serve as a debuggging aid for anyone using the underlying tools or wishing to build their own theme from scratch.
And from the old doca repo's README:
The new @cloudflare/doca does not yet have a fully functioning theme, so this package is still the produciton-ready one. But we will be implementing feature requests on the new code, and moving most open issues to the new repo whenever it makes sense.
So.... yeah, basically it's just a debugging theme for now I'm afraid. We wanted to get the tools out there (there's at least one other tool, for OpenAPI, that is using @cloudflare/json-schema-walker
already) rather than wait on getting a full UI designed and written.
from json-schema-tools.
I tried it on a machine that had never run doca before and I got the same results so I'm guessing its not due to any old versions.
When I said minimally styled I actually meant without any CSS! Sorry for any confusion.
I've been dragged onto other things for the time being. I'll try again when I get back to it.
from json-schema-tools.
I removed the -g option from the RegExps inclient/main.js
. That made the warnings go away. From reading https://webpack.js.org/guides/dependency-management/#require-context it seems to me that the -g option isn't necessary.
from json-schema-tools.
I removed the -g option from the RegExps inclient/main.js. That made the warnings go away. From reading https://webpack.js.org/guides/dependency-management/#require-context it seems to me that the -g option isn't necessary.
Oh great- so it looks like as long as subdirectories is true
it will do what the "g" was trying to do anyway. Would you be willing to open a PR for it?
Yeah, there's no CSS. Or there may be an empty file to make something not complain, I forget. That seemed the best way to make it clear that it's not intended for production use. Maybe I should have put a banner at the top. hmm....
from json-schema-tools.
I'll open a PR for that within a day. FYI, I'll be playing around with these tools a lot this week, so I might find some other things to address. Do you know why the doca-bootstrap-template
is no longer supported? I was able to get it up and running, but it doesn't work with our draft-07
schemas of course. Is there any value in trying to PR against that repo for support with these tools or better to make a new template?
from json-schema-tools.
Or, if you know of specific issues in these tools that's blocking draft-07
support, I'd be happy to help out.
from json-schema-tools.
@genetique-techno it's a bit complicated- for personal reasons I'm taking some time away from the tech industry. So I no longer work at Cloudflare, although obviously I still care about this repo, and am still working on the next draft of the JSON Schema specification (which will mostly be core and validation stuff, probably with minimal Hyper-Schema changes since we're just staring to see draft-07 implemented).
So the simple reason there's no UI right now is that I'm dealing with Real Life Stuff and unable to put a lot of time into one myself, and I'm not sure what the plan is within Cloudflare.
@tomlikestorock are there any near-term plans for an open source new theme on top of this new back-end?
Of course, if you want to work on a UI that would be awesome and may be faster, and I'd be happy to answer questions, review code, discuss UI design options, etc. I've thought about this stuff a lot, I just don't have time to code it right now.
As for why the old doca-bootstrap-theme doesn't work, the old doca (on npm as doca
) and this new doca (@cloudflare/doca
) work with different data structures. The old json-schema-example-loader
package changed the data structure around a lot in order to make the UI easier. However, that meant that the output was no longer a valid JSON Hyper-Schema (of any draft). In the long run, that caused more trouble than it was worth for a variety of reasons, not the least of which being that we couldn't use anyone else's schema tools on the output if we wanted to.
So in this repo, @cloudflare/json-schema-apidoc-loader
(or, really, @cloudflare/json-schema-transform
) still does most of what json-schema-example-loader
used to, except the result is still a valid JSON Hyper-Schema of whatever draft it started out as. It just has extra fields which is something JSON Schema allows.
But that means no older doca
theme will work with @cloudflare/doca
. On the plus side, it should be easier to figure out how to build a theme since if you already know JSON Hyper-Schema, you know 99% of what comes out of the API doc loader as input to the UI. There's no conversion step to learn.
If you want to kick ideas around more, feel free to drop by the JSON Schema slack channel which might be a little better suited than GitHub issues for such things.
from json-schema-tools.
Related Issues (16)
- Error: Cannot find module '@cloudflare/json-hyper-schema' and other start-up bumps... HOT 6
- Getting yarn errors HOT 3
- doca - Create an option for schema glob
- json-schema-ref-loader can't handle circular references HOT 5
- Help with inline import json-schema-ref-loader HOT 5
- Where is the schema for cloudflare api v4? HOT 13
- json-schema-ref-loader NPM package still has `console.error` in loader code.
- Module build failed: LoaderRunnerError: Module: '<path>/json-schema-apidoc-loader/lib/loader.js' is not a loader (must have normal or pitch function)
- Clearly document config.js (base URI and headers)
- Order of properties
- Windows support HOT 2
- Support "examples" (plural) from draft-06
- doca init -title <Title>
- Support project folder outside of working directory
- Webpack process only picks up some of the css files in a theme
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 json-schema-tools.