Skip to content

Commit

Permalink
bug #522 Fix errors in swagger file (alexander-schranz)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.0-dev branch.

Discussion
----------

The https://app.swaggerhub.com/apis/Sylius/sylius-shop-api/1.0.0 is not up2date and the exist swagger.yml in doc/swagger.yml has same errors in it when copy it to https://editor.swagger.io/ 

Commits
-------

bed256e Fix errors in swagger file
0780fbe Fix code style
  • Loading branch information
lchrusciel authored Sep 9, 2019
2 parents fc25f36 + 0780fbe commit 2ebde01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
24 changes: 10 additions & 14 deletions doc/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -779,13 +779,12 @@ paths:
in: "body"
required: true
schema:
type: object
$ref: "#/definitions/LoginRequest"
responses:
200:
description: "User was logged in"
example:
token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9"
schema:
$ref: "#/definitions/LoginSuccess"
/orders:
parameters:
- $ref: "#/parameters/ChannelCode"
Expand Down Expand Up @@ -1047,7 +1046,6 @@ definitions:
type: "array"
description: "Body of request used to put item to the cart."
items:
type: "object"
$ref: "#/definitions/PutItemToCartRequest"
ChangeItemQuantityRequest:
type: "object"
Expand All @@ -1074,10 +1072,8 @@ definitions:
- "shippingAddress"
properties:
shippingAddress:
type: "object"
$ref: "#/definitions/Address"
billingAddress:
type: "object"
$ref: "#/definitions/Address"
CheckoutChooseShippingMethodRequest:
type: "object"
Expand Down Expand Up @@ -1126,7 +1122,6 @@ definitions:
methods:
type: "object"
additionalProperties:
type: "object"
$ref: "#/definitions/ShippingMethod"
Shipment:
type: "object"
Expand All @@ -1144,7 +1139,6 @@ definitions:
- "cancelled"
- "shipped"
method:
type: "object"
$ref: "#/definitions/ShippingMethod"
AvailablePaymentMethods:
type: "object"
Expand Down Expand Up @@ -1179,7 +1173,6 @@ definitions:
- "cancelled"
- "refunded"
method:
type: "object"
$ref: "#/definitions/PaymentMethod"
Cart:
type: "object"
Expand Down Expand Up @@ -1220,13 +1213,10 @@ definitions:
items:
$ref: "#/definitions/Item"
totals:
type: "object"
$ref: "#/definitions/TotalsView"
shippingAddress:
type: "object"
$ref: "#/definitions/Address"
billingAddress:
type: "object"
$ref: "#/definitions/Address"
payments:
type: "array"
Expand All @@ -1241,7 +1231,6 @@ definitions:
items:
type: "object"
additionalProperties:
type: "object"
$ref: "#/definitions/Discount"
couponCode:
description: "Code of the coupon that is associated with this cart"
Expand Down Expand Up @@ -1474,7 +1463,7 @@ definitions:
type: "integer"
example: 5
createdAt:
type: "datetime"
type: "string"
example: "2016-01-02 21:00:10"
comment:
type: "string"
Expand Down Expand Up @@ -1721,6 +1710,13 @@ definitions:
description: "Total amount of cart promotions."
type: "integer"
example: 0
LoginSuccess:
type: "object"
description: "User was logged in."
properties:
token:
type: "string"
example: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9"
PlacedOrder:
type: "object"
description: "Placed order with information about items, current state, totals and more."
Expand Down
2 changes: 1 addition & 1 deletion spec/Handler/Cart/PickupCartHandlerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function it_is_initializable(): void

function it_handles_cart_pickup_for_not_logged_in_user(
ChannelInterface $channel,
CurrencyInterface $currency,
CurrencyInterface $currency,
ChannelRepositoryInterface $channelRepository,
FactoryInterface $cartFactory,
LocaleInterface $locale,
Expand Down

0 comments on commit 2ebde01

Please sign in to comment.