-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config route #26
base: master
Are you sure you want to change the base?
Config route #26
Conversation
I had to change the API route back to a child of the editor route, since separating them completely caused complications for the |
Yeah, because of that auth problem, we might have to hold off on this until the editor is less-integrated and more standalone. Then the auth plugins will have to adapt. Instead of paths, I would prefer So the configuration I'd like to see would be I'm sure there's things I'm not getting and we'll have to hammer them out... If we're not careful, what order we declare routes in can end up hiding routes altogether... |
I will revisit this in a bit. In the meantime, what do you think of the other PR? If you like and could merge it, that reduces what I call the "overhang" of things that might clash with each other :-) |
Sorry, done, yes. And as expected this now conflicts, which is fine. |
48e537b
to
610abe3
Compare
I've now switched it to use One big conceptual question which I'm not sure about yet: how to have more than one API thingy, while still allowing the "no-code" concept I'm keen on. I gather you're after having both an admin UI, with its pet API, while also having a "proper" app. Would this be managed with the main app having two Mojolicious::Plugin::Yancy on the app, one for admin purposes, one for "main app" purposes? That would allow "an" MPY to have "its" editor (if any), and API. This could then be distinguished within a wider app, by having a namespace passed in to the MPY, under which its helpers would be placed, default "yancy". If it's this, then the standalone app could just have some means of specifying this arrangement, allowing config of one MPY to be an admin UI, and the other to be just an API from a given OpenAPI spec. What do you think? |
To be clear, the "this" to work with the Auth would be to allow the |
I'm cool with having the ability to have multiple Mojolicious::Plugin::Yancy, and Remember, the editor is inside the Mojolicious::Plugin::Yancy. The API for the editor is built automatically by Mojolicious::Plugin::OpenAPI, we just need to add The proper app is everything the user does that isn't the Yancy plugin. The auth plugin could just ask the editor what routes it has (add two helpers, |
e88f7a9
to
7badc39
Compare
7badc39
to
ba07b50
Compare
ee1a8a4
to
81b8e5a
Compare
b5a2eb3
to
f1e320b
Compare
623fb65
to
91772bc
Compare
f8df117
to
24fe9d6
Compare
679e582
to
a5c3be4
Compare
c5f5ff2
to
76b2574
Compare
Allows separate configuration of the
yancy_path
and theapi_path
- latter now attaches itself to theparent
of the editor route, not to the editor route itself. This allows e.g./editor
and/api
, not just/yancy
and/yancy/api
.I wanted to make the static files (
bootstrap.css
et al) to be served from the same URL location, e.g./editor/bootstrap.css
, but I couldn't figure out how. Maybe something to do with "static", or "assets"?