-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add an OpenAPI middleware to the org #15
Comments
I would like to get this published soon. @dougwilson How do you feel about publishing this kind of module under the |
Sorry I have been away and haven't had time to put all my ideas here but (1) the pillarjs org is not really the correct org for express middleware (2) it feels weird to add more modules to the org when there are still module languishing and need to either get support or get removed instead of spreading even thinner and (3) idk much about the scopes / how exactly they work / what giving publish rights in the scope means. |
P.S. I like the interface you made for that module |
Apart from the scope question, if you feel really strongly about adding it to the expressjs org (which seems like the correct place for an express middleware), you're welcome to do it. Ideally the repo name should match the npm module name exactly. I think the ones that are published as "express-blah" are just named "blah" in the org, though, so that is acceptable. Ideally as well the readme would blend in with the rest, like how the badges are and stuff, to make them seem like they are somewhat coherent. Is publishing as express-openapi a solution for the module name? If not, what does the scope thing entail? I have thought about using scopes before, but that was after everything was already made, so I thought it would feel very weird if somethings where under scopes but not others. But npm also provides no mechanism to migrate an existing module into a scope as far as I know, so it would effectively be a brand new module with no history and no update alerts to previous users, so just kind of never felt good about trying to move to them. |
No worries, sorry to demand attention like I did :)
Ok, seems reasonable to me. I guess there are two options:
We could still publish under the npm scope with any of the options. We can even make this decision later.
Agreed. I intend to support this as it is something I need at work. The goal of making it "blessed" in this way is more so that we can keep up with the good features other projects are adopting. It's more as a vanity thing for the project to have it under the core name than anything about the feature or
I think if you add me as a member it would mean I can publish new packages in the scope. After that I think it is still per-package permissions like any other package. If you are interested in the docs: |
Thanks! Any improvements or feedback is continually welcome!
Ok, I don't feel strongly, but I do think it is good for the core project to lend some validity to certain types of modules (like session and body-parser for example). It is one of the reasons people like other ecosystems where things come more "batteries included". Not to say we should over index on that.
Agreed.
No, that is already taken.
The whole point of scopes it to allow more control for communities to name their packages. So by using I think having some under the scope and some not is fine. I think ideally we would migrate toward using the scope, but the churn of moving existing packages is nor worth it. We could say "all new modules are under the scope", if we wanted. As I said, mainly it opens organization and naming control by not having to compete with the global namespace. Other than that it should not have repercussions. The babel community migrated to their scope recently and IMO it was a big churn with no real benefit. It caused a ton of problems for uses who then opened issues all over the place. Best avoided if we can. |
So back on the scope thing, thanks for the link. The name |
Oh for some reason I thought you had said that you had it. I must have miss-remembered. I do think it would be reasonable for us to claim that from npm, and for them to give it to us becaues there are no packages published under that scope at the moment. I can reach out to npm and get that discussion started and cc you on the email. |
Sure. I still feel we should not publish this under a scope anyhow. I think that once we introduce scopes, all the middleware not in a scope will appear to many people as not official. I see it's how a lot of npm devs I interact with feel about seeing a scope that it's like an official badge thing. Especially if they don't use scopes themselves. |
If we really really really want a scope, perhaps we should have this discussion in the expressjs org and invite the other express members to participate in the conversation? Having this in pillarjs org seems like the wrong place to talk about express middleware, as that is the separation of the orgs in the first place :) |
Ok, I agree opening the conversation to a broader audience would be great. TBQH the reason I opened it here is that this middleware couples more to I will write up a synopsis of the scope conversation and post it to the express discussion board, as well as start the email to npm so that we have the option if we decide to take it. Either way we should prevent some other group from using |
Actually, didn't really think of that. I think that since you were prefixing it with the suggested Looking at the source code it also uses things like
I believe this is against the npm TOS: it would fall under squatting, right? I'm looking in https://www.npmjs.com/policies/open-source-terms#acceptable-use
|
Doh, right, forgot that I added that. It was not in my original POC code.
Is it squatting if it prevented someone from using it to push malicious code under the guise of the express name? That is really what I would want to prevent by "squatting" on it. And I would think npm would agree. |
I get where you are coming from. I just don't want to violate a rule and get other issues fi we didn't need to have done that in the first place. Publishing as a name such that Moving everything of ours into a scope 100% would be the way to combat that, because then official vs not can actually be distinguished by name, which is how a lot of devs act that I have spoken to. It can still be spoofed by having a similar scope like I've seen some . go out of their way to use things that start with |
I was wondering what people think about adding middleware like this to this org?
I built this because of a need I had, but it is similar to something that Fastify supports directly, so I thought it would be good if express had one as well. I haven't published it yet, and I was thinking that if we liked it we could publish under the
@express
scope.I would also love feedback on the module itself. It is still a work in progress, but if anyone sees any glaring problems, or better api I could adopt, I would like to hear it.
The text was updated successfully, but these errors were encountered: