Skip to content

Commit

Permalink
Revert "Convert swagger.json to OAS 3.0 before generating SDK types (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyrombo committed May 3, 2024
1 parent 146b2e0 commit 36277cd
Show file tree
Hide file tree
Showing 25 changed files with 462 additions and 900 deletions.
49 changes: 0 additions & 49 deletions packages/discovery-provider/src/api/v1/models/access_gate.py

This file was deleted.

Empty file.
89 changes: 0 additions & 89 deletions packages/discovery-provider/src/api/v1/models/extensions/fields.py

This file was deleted.

76 changes: 0 additions & 76 deletions packages/discovery-provider/src/api/v1/models/extensions/models.py

This file was deleted.

7 changes: 2 additions & 5 deletions packages/discovery-provider/src/api/v1/models/tracks.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from flask_restx import fields

from .access_gate import access_gate
from .common import favorite, ns, repost
from .extensions.fields import NestedOneOf
from .users import user_model, user_model_full

track_artwork = ns.model(
Expand Down Expand Up @@ -128,7 +126,6 @@
},
)


track_full = ns.clone(
"track_full",
track,
Expand Down Expand Up @@ -162,9 +159,9 @@
"remix_of": fields.Nested(full_remix_parent),
"is_available": fields.Boolean,
"is_stream_gated": fields.Boolean,
"stream_conditions": NestedOneOf(access_gate, allow_null=True),
"stream_conditions": fields.Raw(allow_null=True),
"is_download_gated": fields.Boolean,
"download_conditions": NestedOneOf(access_gate, allow_null=True),
"download_conditions": fields.Raw(allow_null=True),
"access": fields.Nested(access),
"ai_attribution_user_id": fields.Integer(allow_null=True),
"audio_upload_id": fields.String,
Expand Down
12 changes: 12 additions & 0 deletions packages/discovery-provider/src/api/v1/models/wildcard_model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from flask_restx import Model


class WildcardModel(Model):
"""Hack of the Model that allows the schema to be properly formatted for wildcard."""

@property
def _schema(self):
# Skip the schema for this and surface the child schema if the wildcard is found
if "*" in self:
return self["*"].__schema__
return super(WildcardModel, self)._schema()
2 changes: 1 addition & 1 deletion packages/discovery-provider/src/api/v1/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
)
from src.api.v1.models.common import favorite
from src.api.v1.models.developer_apps import authorized_app, developer_app
from src.api.v1.models.extensions.models import WildcardModel
from src.api.v1.models.grants import managed_user, user_manager
from src.api.v1.models.support import (
supporter_response,
Expand All @@ -78,6 +77,7 @@
user_model_full,
user_subscribers,
)
from src.api.v1.models.wildcard_model import WildcardModel
from src.api.v1.playlists import get_tracks_for_playlist
from src.challenges.challenge_event_bus import setup_challenge_bus
from src.queries.download_csv import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0-SNAPSHOT
7.6.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.openapi-generator-ignore
apis/ChallengesApi.ts
apis/PlaylistsApi.ts
apis/ReactionsApi.ts
Expand All @@ -10,7 +9,6 @@ apis/UsersApi.ts
apis/index.ts
index.ts
models/Access.ts
models/AccessGate.ts
models/ActivityFull.ts
models/Attestation.ts
models/AttestationReponse.ts
Expand All @@ -21,7 +19,6 @@ models/CoverPhoto.ts
models/DownloadMetadata.ts
models/Favorite.ts
models/FieldVisibility.ts
models/FollowGate.ts
models/FollowingResponse.ts
models/FollowingResponseFull.ts
models/FullBulkSubscribersResponse.ts
Expand Down Expand Up @@ -50,16 +47,13 @@ models/HistoryResponseFull.ts
models/ManagedUser.ts
models/ManagedUsersResponse.ts
models/ManagersResponse.ts
models/NftCollection.ts
models/NftGate.ts
models/PlaylistAddedTimestamp.ts
models/PlaylistArtwork.ts
models/PlaylistFull.ts
models/PlaylistFullWithoutTracks.ts
models/PlaylistLibrary.ts
models/ProfilePicture.ts
models/Purchase.ts
models/PurchaseGate.ts
models/PurchasesCountResponse.ts
models/PurchasesResponse.ts
models/RelatedArtistResponseFull.ts
Expand All @@ -74,7 +68,6 @@ models/StemFull.ts
models/StemParent.ts
models/StemsResponse.ts
models/SupporterReference.ts
models/TipGate.ts
models/TopGenreUsersResponseFull.ts
models/TopUsersResponseFull.ts
models/TrackActivityFull.ts
Expand All @@ -90,7 +83,6 @@ models/TransactionHistoryCountResponse.ts
models/TransactionHistoryResponse.ts
models/TrendingIdsResponse.ts
models/TrendingTimesIds.ts
models/UsdcGate.ts
models/UserFull.ts
models/UserManager.ts
models/UserSubscribers.ts
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0-SNAPSHOT
7.6.0-SNAPSHOT

0 comments on commit 36277cd

Please sign in to comment.