Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Better documentation for API
Matthew Kennedye4110d64f8e4
diff --git a/api/docs/v2/storefront/index.yaml b/api/docs/v2/storefront/index.yamlindex 1f76ec7318..b3a1b8935c 100644--- a/api/docs/v2/storefront/index.yaml+++ b/api/docs/v2/storefront/index.yaml@@ -13642,7 +13642,10 @@ paths:is_default: true'/api/v2/storefront/wishlists/{token}':get:- description: 'Retrieves the details of an existing wishlist. Supply the unique wishlist token, and the API will return the corresponding wishlist information.'+ description: |-+ Retrieves a wishlist using the wishlist token.++ If the wishlist is publicly viewable, the endpoint will return the requested wishlist regardless of the user. If the wishlist is private, only the wishlist owner can access the wishlist.summary: Retrieve a Wishlisttags:- Wishlists@@ -16723,7 +16726,7 @@ components:schema:type: stringexample: wished_items.variant- description: 'Specify the related resources you would like to receive in the `included` section of the response body. You can also retrieve related resources of included resources by using the dot notation, eg. `wished_items.variant`. [More information](https://jsonapi.org/format/#fetching-includes)'+ description: 'Specify the related resources you would like to receive in the `included` section of the response body. You can also retrieve related resources of included resources by using the dot notation, eg. `wished_items.variant`. [More information](https://jsonapi.org/format/#fetching-includes).'WishlistIsVariantIncludedParam:name: is_variant_includedin: query@@ -16789,9 +16792,9 @@ components:type: stringWishlistSparseFieldsParam:in: query- name: fields- description: Specify the attributes you would like returned for the given types in the response body.- example: '[wishlist]=name,is_default'+ name: 'fields[wishlist]'+ description: Specify the attributes you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).+ example: 'name,is_default'schema:type: stringresponses:diff --git a/api/spec/requests/spree/api/v2/storefront/wishlists_spec.rb b/api/spec/requests/spree/api/v2/storefront/wishlists_spec.rbindex f687786555..fac79d221e 100644--- a/api/spec/requests/spree/api/v2/storefront/wishlists_spec.rb+++ b/api/spec/requests/spree/api/v2/storefront/wishlists_spec.rb@@ -109,7 +109,7 @@ RSpec.describe Spree::Api::V2::Storefront::WishlistsController, type: :request dendcontext 'when a request is sent by random user with no auth' do- it 'returns 404 when wishlist is set to is_private: true' do+ it 'returns 403 when wishlist is set to is_private: true' doget "/api/v2/storefront/wishlists/#{wishlist_private.token}"expect(response).to have_http_status(:forbidden)end