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

Open api/0.12 spec #369

Open
wants to merge 158 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
2ba6840
Allow path to be null and eager load relations
alecritson Dec 14, 2020
379f412
Allow null on basket id
alecritson Dec 14, 2020
e3ac284
Don’t try and parse option json values
alecritson Dec 14, 2020
b8ffa92
Add create basket to spec
alecritson Dec 14, 2020
39c0690
Don’t parse and/or sort product option data
alecritson Dec 14, 2020
c09cc06
Merge in master
alecritson Dec 14, 2020
739049f
Updates and improvements
alecritson Jan 6, 2021
521983b
Add tests
alecritson Jan 6, 2021
dbd933e
Add attribute and negate n+1 issue
alecritson Jan 6, 2021
8c422ce
Tidy up
alecritson Jan 6, 2021
dc16f3e
Aggregation and filter fixes
alecritson Jan 6, 2021
8790608
Squashed commit of the following:
alecritson Jan 6, 2021
cc0b1a7
Fix page/offset
alecritson Jan 8, 2021
696ba08
Change - to a pipe for multi filtering
alecritson Jan 8, 2021
558f5c4
Change post to put on basket lines
alecritson Jan 8, 2021
4bd4138
Revert channel and customer group scope
alecritson Jan 8, 2021
fd01639
Add parsing and add handle to attribute
alecritson Jan 8, 2021
7651454
Fix tests
alecritson Jan 8, 2021
965763d
Clean up
alecritson Jan 12, 2021
9ebb818
Add check if we’re in the console
alecritson Jan 12, 2021
410fc2c
If the name column exists already, remove and replace it
alecritson Jan 12, 2021
90164a3
Add draft flag
alecritson Jan 12, 2021
553c3da
Remove global scope bypassing on index
alecritson Jan 12, 2021
bbd6cb4
Use eager loaded categories
alecritson Jan 12, 2021
4e260b3
Add count to pagination
alecritson Jan 12, 2021
c8c6834
Tweak offset logic
alecritson Jan 12, 2021
0bd681b
Don’t send up billing info
alecritson Jan 12, 2021
d39f5fd
Fix up discount CRUD
alecritson Jan 14, 2021
c1ce7f5
Fix issue with passed index on search
alecritson Jan 14, 2021
587f9a3
Set default channels on discount when creating
alecritson Jan 15, 2021
79012ad
Make name nullable
alecritson Jan 15, 2021
61a2251
Apply fixes from StyleCI (#347)
alecritson Jan 15, 2021
e7388d1
Fix shipping estimate endpoint
alecritson Jan 15, 2021
7fe181c
Import missing class
alecritson Jan 15, 2021
600c8d0
Adjust imports
alecritson Jan 18, 2021
a012413
Only reindex products if we have any
alecritson Jan 18, 2021
d0a4062
Fix asset uploading for YouTube and urls
alecritson Jan 20, 2021
933299b
Update root category nested set before deleting
alecritson Jan 20, 2021
9d8c12e
Add fillable
alecritson Jan 20, 2021
47a4798
Add loading
alecritson Jan 20, 2021
d7cfe1f
Improve filtering
alecritson Jan 20, 2021
06b3fb2
Allow empty array on relations
alecritson Jan 20, 2021
2765d8f
Set default depth to 0 (root)
alecritson Jan 20, 2021
d35f913
Fix PSR-4
alecritson Jan 20, 2021
74618cf
Apply fixes from StyleCI (#351)
alecritson Jan 20, 2021
780884a
Only apply filters if we’re not on the hub
alecritson Jan 20, 2021
6e0c2a8
Add method to delete from index
alecritson Jan 20, 2021
c1e1184
Pass user through when setting billing address
alecritson Jan 20, 2021
ee17a22
Add counts to search id fetching
alecritson Jan 20, 2021
fbed3bb
Save address against user
alecritson Jan 20, 2021
a623172
Remove product from index with hard deleting
alecritson Jan 20, 2021
531f6ff
Add category observer
alecritson Jan 20, 2021
a587f94
Remove permission check for the time
alecritson Jan 20, 2021
f54f6df
Only delete if we have an index
alecritson Jan 20, 2021
5d463cc
Set up a mock transport for Elasticsearch
alecritson Jan 20, 2021
60439ce
Apply fixes from StyleCI (#353)
alecritson Jan 21, 2021
cfa2fc7
Updates
alecritson Jan 21, 2021
9897b20
Make depth 1 by default
alecritson Jan 22, 2021
402b7ac
StyleCI fix
alecritson Jan 22, 2021
91f2623
Apply fixes from StyleCI (#355)
alecritson Jan 22, 2021
d974bb3
Only cancel if full refund
alecritson Jan 25, 2021
c12c6c3
Add nullable to fields
alecritson Feb 11, 2021
9f9d207
Add payment provider actions
alecritson Feb 11, 2021
6183a38
Add action to rebuild tree
alecritson Feb 11, 2021
ccce131
Add some maintenance migrations
alecritson Feb 11, 2021
bd0d189
Typehint request
alecritson Feb 11, 2021
067beb7
Register the rebuild tree command
alecritson Feb 11, 2021
be03b26
Run drafter in a transaction
alecritson Feb 11, 2021
22b51f4
Routing fixes
alecritson Feb 11, 2021
9edf949
Use `include` for current user
alecritson Feb 11, 2021
3324b49
Init action
alecritson Feb 11, 2021
ddf3db4
Update to support multiple pipe values
alecritson Feb 11, 2021
e0d6663
Add stripe intents driver
alecritson Feb 11, 2021
4dca575
Fixes and remove generic company_name field
alecritson Feb 11, 2021
a10b861
Check for settings asset source
alecritson Feb 11, 2021
7677d6d
Add endpoint for user addresses
alecritson Feb 11, 2021
f988fdd
Update spec
alecritson Feb 11, 2021
e57d639
Add timestamps
alecritson Feb 11, 2021
941abfb
Shipping updates
alecritson Feb 11, 2021
315eaf9
Fixes
alecritson Feb 11, 2021
aaff3d2
Drafting refactoring
alecritson Feb 11, 2021
d9f9e51
Fix wildcard search
alecritson Feb 16, 2021
2968148
Search optimisations
alecritson Feb 16, 2021
206bdd8
Drafting Refactor
alecritson Feb 16, 2021
247fc63
Allow attribute data to be null on update
alecritson Feb 16, 2021
f27ebd0
Start migration to actions
alecritson Feb 16, 2021
84de763
Update spec
alecritson Feb 16, 2021
5db6c22
Add and fix drafting testing
alecritson Feb 16, 2021
c05165f
Apply fixes from StyleCI (#358)
alecritson Feb 16, 2021
c1ea5e0
Add initial 0.12 changelog
alecritson Feb 16, 2021
43c9bb5
Merge branch 'master' into release/0.12.0
alecritson Feb 16, 2021
c9e7184
Remove empty line
alecritson Feb 16, 2021
c8d2d44
Fixes
alecritson Feb 19, 2021
5029cdf
Fix some publishing issues
alecritson Feb 19, 2021
fa5a16e
Fix factory
alecritson Feb 19, 2021
7816f34
Allow path to be passed through on update
alecritson Feb 19, 2021
92ce28e
Versioning updates
alecritson Feb 21, 2021
f0b923f
Don’t override draft relation loading
alecritson Feb 22, 2021
7330a28
Handle passing of handle as ownertype
alecritson Feb 22, 2021
e59af76
Category draft and version updates
alecritson Feb 22, 2021
186ad78
Reporting updates
alecritson Feb 26, 2021
52ff88f
Only drop if the country exists
alecritson Feb 26, 2021
22620cc
Fixes to migrations
alecritson Feb 26, 2021
0b04479
Check for column before adding
alecritson Feb 26, 2021
dbe5dc9
Add numeric validation to price field
alecritson Mar 1, 2021
9b3f5aa
Add Codacy yaml
alecritson Mar 1, 2021
759c426
Ignore tests on codacy
alecritson Mar 1, 2021
83163e8
Remove logging
alecritson Mar 1, 2021
895b197
Apply fixes from StyleCI (#360)
alecritson Mar 1, 2021
e025b6a
Ignore database codacy
alecritson Mar 1, 2021
c9c17e7
Return invoice download
alecritson Mar 2, 2021
0d81818
Update spec
alecritson Mar 9, 2021
3c12929
Update spec
alecritson Mar 9, 2021
77c8c24
Update guzzle
alecritson Mar 9, 2021
3584898
Update user fetching and reports
alecritson Mar 9, 2021
ec1935a
Fix OpenAPI spec error (#361)
glennjacobs Mar 9, 2021
4875541
Fire indexable event
alecritson Mar 10, 2021
e30def7
Trim the SKU
alecritson Mar 10, 2021
478ada4
Fix drafting
alecritson Mar 10, 2021
a3773bb
Merge branch 'release/0.12.0' of https://github.com/getcandy/candy-ap…
alecritson Mar 10, 2021
abe613d
Add action to get current customer groups
alecritson Mar 10, 2021
8a6102d
Make threshold 1 for displaying
alecritson Mar 10, 2021
39b1842
Return element no matter what
alecritson Mar 11, 2021
f0b64d0
Fixes to asset id association
alecritson Mar 11, 2021
fb85c23
Add check before we remove the column
alecritson Mar 11, 2021
8bf1059
Add report exports
alecritson Mar 15, 2021
d143f46
Update CHANGELOG.md
alecritson Mar 16, 2021
9247e27
Update CHANGELOG.md
alecritson Mar 16, 2021
8319958
Move shipping method index to an action
alecritson Mar 17, 2021
ede0d31
Merge branch 'release/0.12.0' of https://github.com/getcandy/candy-ap…
alecritson Mar 17, 2021
6983e47
Add reward resources
alecritson Mar 17, 2021
2a3c3af
Check placed_at is null for active order
alecritson Mar 17, 2021
b0cd8f2
Return exchange rate
alecritson Mar 17, 2021
92b51b3
Apply fixes from StyleCI (#362)
alecritson Mar 17, 2021
7e6a358
Handle multiple emails if billing/shipping differ
alecritson Mar 17, 2021
7f67fc9
Fix array access
alecritson Mar 17, 2021
d7399d5
Merge branch 'release/0.12.0' of https://github.com/getcandy/candy-ap…
alecritson Mar 17, 2021
c831d92
Language Refactoring (#363)
alecritson Mar 18, 2021
72a7399
Trigger indexable even when restoring
alecritson Mar 18, 2021
aaaa441
Add keyword search to product families
alecritson Mar 18, 2021
9a601f7
Add phone email to mass assignment
alecritson Mar 18, 2021
71c15f7
Hotfix `lang` attribute reference
alecritson Mar 18, 2021
d5dca98
Feat/route refactoring (#366)
alecritson Mar 19, 2021
23060f5
Fixes to drafting and route creation
alecritson Mar 19, 2021
14114e0
Update references to RouteResource
alecritson Mar 19, 2021
ebc118e
Recycle bin updates
alecritson Mar 19, 2021
dbfc2f5
Fix recycle bin searching
alecritson Mar 19, 2021
6350ce0
Spec update
alecritson Mar 22, 2021
cffbc43
Fix tests
alecritson Mar 22, 2021
1829b89
Add activity log spec update
alecritson Mar 23, 2021
7fe420c
Merge in master
alecritson Mar 24, 2021
a67ecfa
Add recyclebin and model examples
alecritson Mar 24, 2021
f06da6c
Merge branch 'master' into open-api/0.12-spec
alecritson Mar 24, 2021
df86513
Update spec
alecritson Mar 25, 2021
e8130fd
Fix to api spec formatting
glennjacobs Mar 26, 2021
806974c
Update spec for channels
alecritson Mar 26, 2021
ee5f918
Merge branch 'open-api/0.12-spec' of https://github.com/getcandy/cand…
alecritson Mar 26, 2021
99f32c8
Update SearchForRoute.php
glennjacobs Jun 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion openapi/activity-log/models/ActivityLog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@ type: object
properties:
id:
type: string
example: 181398
type:
type: string
example: 'default'
description:
type: string
example: 'status-update'
properties:
type: string
type: object
example: {
"previous": "payment-received",
"new": "refunded"
}
created_at:
type: string
example: '2020-03-24T10:11:12.000000Z'
user:
$ref: '../../users/responses/UserResponse.yaml'
16 changes: 16 additions & 0 deletions openapi/assets/models/Asset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,50 @@ type: object
properties:
id:
type: string
example: 1w2ndkgo
title:
type: string
example: Olive clog boots
type:
type: string
nullable: true
example: product
caption:
type: string
example: Olive clog boots
kind:
type: string
example: image
external:
type: boolean
example: false
position:
type: integer
example: 1
primary:
type: boolean
example: true
url:
type: string
example: http:\/\/cdn.test\/storage\/products\/2020\/01\/SBBsDXmM8pg.jpg
sub_kind:
type: string
example: jpeg
extension:
type: string
example: 'jpg'
original_filename:
type: string
example: 'B15Z31__58612_std.jpg'
size:
type: string
example: 88408
width:
type: string
example: 601
height:
type: string
example: 1000
transforms:
$ref: '../responses/AssetTransformCollection.yaml'
tags:
Expand Down
115 changes: 16 additions & 99 deletions openapi/categories/models/Category.yaml
Original file line number Diff line number Diff line change
@@ -1,120 +1,37 @@
title: Category
type: object
x-examples:
Standard with mapped attributes:
id: v8l4pl01
sort: 'min_price:asc'
products_count: 0
children_count: 1
left_pos: 1
right_pos: 938
description: Category description
meta_keywords: null
name: Fasteners
page_title: Seo page title
short_description: Short Description
meta_description: Page meta description
layout: []
primary_asset: []
Full response:
id: v8l4pl01
sort: 'min_price:asc'
products_count: 0
children_count: 1
left_pos: 1
right_pos: 938
attribute_data:
description:
webstore:
en: Category description
meta_keywords:
webstore:
en: ""
name:
webstore:
en: Category name
page_title:
webstore:
en: Page title
short_description:
webstore:
en: Short description
meta_description:
webstore:
en: Meta description
layout: []
primary_asset: []
Full response with child:
id: v8l4pl01
sort: 'min_price:asc'
products_count: 0
children_count: 1
left_pos: 1
right_pos: 938
attribute_data:
description:
webstore:
en: Category description
meta_keywords:
webstore:
en: ""
name:
webstore:
en: Category name
page_title:
webstore:
en: Page title
short_description:
webstore:
en: Short description
meta_description:
webstore:
en: Meta description
children:
data:
- id: p09prlrn
sort: 'min_price:asc'
left_pos: 2
right_pos: 937
attribute_data:
description:
webstore:
en: ''
meta_keywords:
webstore:
en: ''
name:
webstore:
en: Child Category
page_title:
webstore:
en: Child category SEO title
short_description:
webstore:
en: ''
meta_description:
webstore:
en: Child Category meta description
layout: []
primary_asset: []
layout: []
primary_asset: []
description: ''
properties:
id:
type: string
example: v8l4pl01
sort:
type: string
example: min_price:asc
products_count:
type: integer
example: 778
children_count:
type: integer
example: 15
depth:
type: integer
example: 0
left_pos:
type: integer
example: 1
right_pos:
type: integer
example: 2
created_at:
type: string
example: "2020-11-19T10:28:56.000000Z"
name:
type: string
example: Fashion
description:
type: string
example: "<p>Discover early autumn fashion. Cotton silk leopard smock dresses. Deep v-neck knitted tank tops. Black contrast stitch denim jeans. Khaki quilted jackets with tortoiseshell toggle buttons. Tobacco gingham cotton dresses.&nbsp;Shop all of fashion below.<\/p>"
attribute_data:
type: object
children:
Expand Down
11 changes: 1 addition & 10 deletions openapi/channels/paths/channels.id.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ parameters:
required: true
get:
summary: Get the channel resource
x-code-samples:
- lang: PHP
source:
$ref: ../examples/code/fetch-channel/laravel.php
responses:
'200':
description: OK
Expand All @@ -25,11 +21,6 @@ get:
$ref: '../../global/responses/ApiError.yaml'
operationId: get-channels-channelId
description: ''
parameters:
- schema:
type: string
in: query
name: includes
tags:
- Channels
put:
Expand All @@ -50,7 +41,7 @@ put:
operationId: put-channels-channelId
requestBody:
content:
multipart/form-data:
application/json:
schema:
$ref: '../requests/UpdateChannelBody.yaml'
description: ''
Expand Down
15 changes: 3 additions & 12 deletions openapi/channels/paths/channels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,8 @@ get:
$ref: '../responses/ChannelCollection.yaml'
operationId: get-channels
parameters:
- schema:
type: string
in: query
name: includes
description: Comma separated includes for the resource
- schema:
type: number
in: query
name: per_page
description: How many results per page
- $ref: '../../openapi.yaml#/components/parameters/perPageParam'
- $ref: '../../openapi.yaml#/components/parameters/pageParam'
description: Gets a paginated list of all channel
tags:
- Channels
Expand All @@ -41,10 +33,9 @@ post:
operationId: post-channels
requestBody:
content:
multipart/form-data:
application/json:
schema:
$ref: '../requests/CreateChannelBody.yaml'
examples: {}
description: ''
tags:
- Channels
9 changes: 8 additions & 1 deletion openapi/channels/requests/CreateChannelBody.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ type: object
properties:
handle:
type: string
example: "mobileapp"
name:
type: string
example: "Mobile App"
url:
type: string
nullable: true
example: "mobileapp:Index"
default:
type: boolean
nullable: true
nullable: true
default: false
required:
- name
- handle
6 changes: 5 additions & 1 deletion openapi/channels/requests/UpdateChannelBody.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ properties:
handle:
type: string
nullable: true
example: "webstore"
name:
type: string
nullable: true
example: "Webstore"
url:
type: string
nullable: true
example: "localhost:8080"
default:
type: boolean
nullable: true
nullable: true
example: true
12 changes: 2 additions & 10 deletions openapi/collections/models/Collection.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
title: Collection
type: object
description: |-
### Available includes

- routes
- layout
- channels
- assets
- attributes
- products
- customerGroups
description:
properties:
id:
type: string
example: v8l4pl01
attribute_data:
type: object
routes:
Expand Down
10 changes: 9 additions & 1 deletion openapi/countries/models/Country.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,25 @@ type: object
properties:
id:
type: string
example: v8l4q190
name:
type: string
example: United Kingdom
region:
type: string
example: Europe
iso_a_2:
type: string
example: GB
iso_a_3:
type: string
example: GBR
iso_numeric:
type: string
example: 826
preferred:
type: boolean
example: true
enabled:
type: boolean
type: boolean
example: true
15 changes: 12 additions & 3 deletions openapi/currencies/models/Currency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,28 @@ type: object
properties:
id:
type: string
code:
type: string
example: kdj58jom
name:
type: string
example: British Pound
code:
type: string
example: GBP
enabled:
type: boolean
example: true
format:
type: string
example: £{price}
exchange_rate:
type: string
example: 1
decimal_point:
type: string
example: '.'
thousand_point:
type: string
example: ','
default:
type: boolean
type: boolean
example: true
Loading