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

Issue #4973 Upgrade viewer specific APIs to v5 #5362

Open
wants to merge 95 commits into
base: staging
Choose a base branch
from
Open

Conversation

FJThiel
Copy link
Contributor

@FJThiel FJThiel commented Jan 24, 2025

This fixes #4973

Description

Moves over v4 APIs that are used by the viewer to the v5 style.

Changed APIs listed below:
(Note: routes below updated after receiving feedback)

Get Model Properties:
Old API:
/<teamspace>/<modelID>/revision/<revision>/modelProperties.json
New API (Container):
/v5/teamspaces/<teamspace>/projects/<projectID>/containers/<containerID>/assets/properties
New API (Federation):
/v5/teamspaces/<teamspace>/projects/<projectID>/federations/<containerID>/assets/properties

Get Repo Assets:
Old API:
/<teamspace>/<modelID>/revision/<revision>/repoAssets.json
New API (Container):
/v5/teamspaces/<teamspace>/projects/<projectID>/containers/<containerID>/assets/repobundles
New API (Federation):
/v5/teamspaces/<teamspace>/projects/<projectID>/federations/<containerID>/assets/repobundles

Get Metadata (assets meta)
Old API:
/<teamspace>/<modelID>/revision/<revision>/assetsMeta
New API (Container)
/v5/teamspaces/<teamspace>/projects/<projectID>/containers/<containerID>/assets/legacyBundleMetadata
New API (Federation):
/v5/teamspaces/<teamspace>/projects/<projectID>/federations/<containerID>/assets/legacyBundleMetadata

Get Mesh
Old API:
/<teamspace>/<modelID>/meshes/<meshID>
New API (Container):
/v5/teamspaces/<teamspace>/projects/<projectID>/containers/<containerID>/assets/meshes/:meshId

Get Unity Asset Bundle
Old API:
/<teamspace>/<modelID>/<bundleID>.unity3d
New API (Container):
/v5/teamspaces/<teamspace>/projects/<projectID>/containers/<containerID>/assets/unitybundles/<bundleID>

Get Repo Asset Bundle:
Old API:
/<teamspace>/<modelID>/<bundleID>.repobundle
New API (Container):
/v5/teamspaces/<teamspace>/projects/<projectID>/containers/<containerID>/assets/repobundles/<bundleID>

Get Asset Maps for Container
Old API:
/<teamspace>/<containerID>/revision/<revisionID>/supermeshes.json.mpc
New API (Container):
/v5/teamspaces/<teamspace>/projects/<projectID>/containers/<containerID>/assets/supermeshes
/v5/teamspaces/<teamspace>/projects/<projectID>/containers/<containerID>/assets/supermeshes

Get Asset Maps for Federation
Old API:
/<teamspace>/<modelID>/revision/master/head/supermeshes.json.mpc
New API (Federation):
/v5/teamspaces/<teamspace>/projects/<projectID>/federations/<federationID>//assets/supermeshes

Get Texture:
Old API:
/<teamspace>/<containerID>/<textureID>.texture
New API (Container):
/v5/teamspaces/<teamspace>/projects/<projectID>/containers/<containerID>/assets/textures/<textureID>

Get bundle mapping:
Old API:
/<teamspace>/<modelID>/<bundleID>.json.mpc
New API (Container):
/v5/teamspaces/<teamspace>/projects/<projectID>/containers/<containerID>/assets/bundleMappings/<bundleID>

Test cases

  • These new APIs should be reachable and return the expected results
  • 14 new tests with 321 new test cases have been added.

…m already existing in the v5 typeCheck file. Replaced where used.
…alisation since binFacesString is inaccessible and only called by it.
…t was discovered while writing unit tests
@FJThiel
Copy link
Contributor Author

FJThiel commented Jan 30, 2025

@carmenfan @sebjf

The routes are now renamed and revision information has been put into the query string.

@carmenfan carmenfan self-requested a review January 30, 2025 14:56
@FJThiel
Copy link
Contributor Author

FJThiel commented Jan 30, 2025

I have updated the description of the PR with the changed routes and the new one added (bundleMappings).

@FJThiel
Copy link
Contributor Author

FJThiel commented Feb 5, 2025

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@FJThiel
Copy link
Contributor Author

FJThiel commented Feb 11, 2025

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@FJThiel
Copy link
Contributor Author

FJThiel commented Feb 11, 2025

Viewer PR: Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants