Skip to content
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

Clean up /schemas on main branch #4356

Open
3 of 6 tasks
duncanbeevers opened this issue Feb 13, 2025 · 5 comments · Fixed by #4361 · May be fixed by #4362
Open
3 of 6 tasks

Clean up /schemas on main branch #4356

duncanbeevers opened this issue Feb 13, 2025 · 5 comments · Fixed by #4361 · May be fixed by #4362

Comments

@duncanbeevers
Copy link
Contributor

duncanbeevers commented Feb 13, 2025

🗣 Discussion

The main branch contains a /schemas folder with files we don't want end-users consuming directly. In order to shield users from these files, the same way we do with /src, they should be present on the dev branch and not on the main branch.

@notEthan
Copy link
Contributor

What? Why?
I don't know who would need to be "shielded" or why these shouldn't be consumed. My own OpenAPI tooling is built with these schemas pretty much as its foundation.
I'm confused the intention here. Is the plan to not publish schemas anymore? If so, that's pretty terrible. If not, it seems like this just makes it harder for anybody who wants these schemas to find them - they won't even exist outside of development branch(es)? They've lived where they are for a decade, why make it difficult for people?

@handrews
Copy link
Member

@notEthan Schemas are officially published in JSON form with correct $ids to the spec.openapis.org site via the gh-pages branch. The files on main are YAML sources with placeholder WORK-IN-PROGRESS values in $id and are not official publications. This is (obviously) confusing, so we're having sources in one place (src on various branches) and published schemas in one place (spec.openapis.org, which is our official publication location for both spec and schemas).

@notEthan
Copy link
Contributor

Okay, I was thrown by interpreting/misinterpreting that the schemas in /schemas are not to be consumed, but that just meant the stuff under development (I did look for other discussion to see if I had this wrong but failed to find it). Pardon my confusion on that.

I'm still not sure the motivation for removing the existing published schemas - v2.0 in particular, still significantly in use but I don't see its schema on spec.openapis.org. Does this have a home? (1.x too but I haven't seen any 1.x in a very long time, don't know that it has significant use anymore.)

I feel like having published versions on main of both the specifications and schemas is valuable, seems preferable to navigating the web site or accessing the relatively obscure gh-pages branch. But I'll deal with it if that doesn't work for OAI.

@handrews
Copy link
Member

@notEthan good catch on 2.0 and 1.2. We don't currently publish those spec versions on spec.openapis.org (perhaps we should). I don't have a strong feeling about leaving those schemas on main, as long as 3.0+ (which are placeholders from an outdated development workflow that was always confusing to both contributors and users) get removed. I slightly prefer moving everything to the spec site, but that's just my personal love of consistency and should be balanced against community needs. I'm also fine with "1.2 and 2.0 aren't broken, so dont fix them" and just leave a README explaining the 3.x situation (by pointing to CONTRIBUTING.md).

@ralfhandl
Copy link
Contributor

ralfhandl commented Feb 17, 2025

2.0 and 1.2. We don't currently publish those spec versions on spec.openapis.org (perhaps we should)

The 2.0 schema's id is

"id": "http://swagger.io/v2/schema.json#",

and it can be fetched from http://swagger.io/v2/schema.json#, so apparently the OAI doesn't own this schema. Also the README points to the NPM package swagger-schema-official which is also not owned by the OAI.

If we want to add it despite the ownership problem, we should also show the 2.0 spec:

The 1.2 schemas have a surprising structure, so I would leave them out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
4 participants