fabric-meta icon indicating copy to clipboard operation
fabric-meta copied to clipboard

V3 Metadata API

Open modmuss50 opened this issue 7 months ago • 2 comments

Note: There are no plans to remove or deprecated the V1 or V2 API's

This issue is a place to discuss/track ideas for a V3 of the metadata API. V1 and V2 were created without a lot of thought and contain data that is no longer required. The goal of V3 is to provide a consise API and prepare for future addions. This issue does not contain the final form of the API.

Please leave any suggestions in the comments on this issue.

V3 high level features

  • [ ] Installer versions
  • [ ] List of intermediary versions
  • [ ] List of game versions
  • [ ] List of loader versions
  • [ ] Server launcher jar, for given versions
  • [ ] Client profile json
  • [ ] Better defined documentation/schema
    • Note that maven ids can have classifiers
    • Don't expose the maven hostname where possible
    • Document fallback maven/meta servers
  • [ ] Anticipate loader only running on newer Java versions, not planned to be used yet.
  • [ ] Support "intermediary-less" install of older versions.
  • [ ] Use v2 intermediary in prod

Future additions

  • [ ] Fabric API versions, with supported Minecraft versions
    • LIkely driven by some SQLite DB
  • [ ] Fabric Loader's "semver" compatible Minecraft version.

Misc changes

A list of changes to be made to fabric-meta that does not relate to to the public API.

  • [x] Add checkstyle
  • [x] Add some unit/intergration tests, to ensure that we dont break the existing endpoints
  • [x] Update all dependencies, and update to Java 21 for some loom goodness
  • [ ] General code cleanup

API

/v3/versions/installer

Returns a list of all installer versions.

[
  {
    "name": "net.fabricmc:fabric-installer:0.11.2",
    "stable": true
  },
  {
    "name": "net.fabricmc:fabric-installer:0.11.1",
    "stable": false
  }
]

/v3/versions/intermediary

Returns a list of all intermediary versions.

[
  {
    "name": "net.fabricmc:intermediary:1.20.4"
  },
  {
    "name": "net.fabricmc:intermediary:1.20.4-rc1"
  }
]

/v3/versions/minecraft

Returns a list of all game versions, older versions that do not have an intermediary name are marked as legacy.

[
  {
    "id": "23w60a",
    "java": 17,
    "stable": false,
    "legacy": false
  },
  {
    "id": "1.20.4",
    "java": 17,
    "stable": true,
    "legacy": false
  },
  {
    "id": "1.4.7",
    "java": 8,
    "stable": true,
    "legacy": true
  },
]

/v3/versions/loader

[
  {
    "name": "net.fabricmc:fabric-loader:0.15.2",
    "java": 8,
    "stable": true
  },
  {
    "name": "net.fabricmc:fabric-loader:0.15.1",
    "java": 8,
    "stable": false
  }
]

/v3/server/:game_version/:loader_version/:installer_version

/v3/server/:game_version/:loader_version

/v3/server/:game_version

/v3/server

Provides a download for the server launcher jar, the versions can be omitted to use the latest stable version.

/v3/client/:game_version/:loader_version

TODO: Come up with a new stable schema for custom launchers that will not change. Likely very similar to the current json. TODO: also offer this without intermediary for none Minecraft installs.

/v3/client/:game_version/:loader_version/vanilla

Provides a profile json in the format only for the vanilla launcher. Look into the "modern" schema as noted in #12 This should only be used by launchers/installers that utilise the vanilla Minecraft launcher. This may change if required.

modmuss50 avatar Dec 15 '23 10:12 modmuss50

Maybe some endpoints for Loom versions to Minecraft versions, eg: since 1.20.3+ doesn't work with <1.3-SNAPSHOT

IMB11 avatar Dec 15 '23 15:12 IMB11

Maybe some endpoints for Loom versions to Minecraft versions, eg: since 1.20.3+ doesn't work with <1.3-SNAPSHOT

This is something I have been thinking of just adding it to loom tbh, Im not sure it needs a whole API for it. Loom 1.5 also has some changes that will force people onto newer versions if one of their depedencies (such as FAPI) was built with a newer version.

Im not going to rule that out, but I dont think its in sope of what I want to do for the first V3. I am mostly concentrating on cleaning up/improving what V2 already covers.

modmuss50 avatar Dec 15 '23 15:12 modmuss50