You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix all client-spec compliance issues identified in code review
- Fix permission routes to use /api/v1/auth (not /api/v1/permissions) per spec
- Update permission check to use POST method with JSON body
- Fix analytics.getMeta() → analytics.meta(cube) in all docs
- Fix automation.trigger() signature to match implementation
- Fix auth.refreshToken() to take string parameter
- Fix permissions.getEffectivePermissions() to take no object argument
- Fix storage.upload() and getDownloadUrl() signatures
- Fix packages.install() to use manifest object
- Remove unused beforeAll import from integration test
- Add assertions to TC-DISC-004 test case
- Update all server references to clarify external dependency
- Remove non-existent hub namespace from documentation
- Update CI/CD examples to show placeholder structure
- Qualify compliance claims to be more accurate
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copy file name to clipboardExpand all lines: content/docs/guides/client-sdk.mdx
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,7 @@ if (discovery.services?.auth?.enabled) {
105
105
106
106
## Protocol Coverage
107
107
108
-
The `@objectstack/client` SDK is **100% compliant** with the ObjectStack API protocol specification. It implements all 13 API namespaces defined in `@objectstack/spec`:
108
+
The `@objectstack/client` SDK aims to implement the ObjectStack API protocol specification. It covers all 13 API namespaces defined in `@objectstack/spec`:
109
109
110
110
| Namespace | Status | Methods | Purpose |
111
111
|:----------|:------:|:--------|:--------|
@@ -124,7 +124,7 @@ The `@objectstack/client` SDK is **100% compliant** with the ObjectStack API pro
**Full compliance verification**: See [`CLIENT_SPEC_COMPLIANCE.md`](https://github.com/objectstack-ai/spec/blob/main/packages/client/CLIENT_SPEC_COMPLIANCE.md) for detailed method-by-method verification and [`CLIENT_SERVER_INTEGRATION_TESTS.md`](https://github.com/objectstack-ai/spec/blob/main/packages/client/CLIENT_SERVER_INTEGRATION_TESTS.md) for comprehensive integration test specifications.
127
+
**Protocol compliance & verification**: See [`CLIENT_SPEC_COMPLIANCE.md`](https://github.com/objectstack-ai/spec/blob/main/packages/client/CLIENT_SPEC_COMPLIANCE.md) for detailed method-by-method verification and [`CLIENT_SERVER_INTEGRATION_TESTS.md`](https://github.com/objectstack-ai/spec/blob/main/packages/client/CLIENT_SERVER_INTEGRATION_TESTS.md) for comprehensive integration test specifications.
**Service availability**: Optional services (auth, workflow, ai, etc.) are only available when the corresponding plugin is installed on the server. Always check `client.discovery?.services` to verify service availability before calling these methods.
299
+
**Service availability**: Optional services (workflow, ai, etc.) are only available when the corresponding plugin is installed on the server. Always check `client.discovery?.services` to verify service availability before calling these methods.
300
300
</Callout>
301
301
302
302
---
@@ -437,12 +437,14 @@ Unit tests use mocks to verify client behavior without requiring a server.
437
437
438
438
### Integration Tests
439
439
440
+
**Note:** Integration tests require a running ObjectStack server. The server is provided by a separate repository and must be set up independently.
441
+
440
442
```bash
441
-
#Terminal 1: Start test server
442
-
cd packages/server
443
-
pnpm dev:test
443
+
#Prerequisite: Start an ObjectStack server with test data
444
+
# For example, using the reference server repository
445
+
# Follow the server repository's documentation for local setup
444
446
445
-
#Terminal 2: Run integration tests
447
+
#From this repository, run the integration test script
Copy file name to clipboardExpand all lines: packages/client/CLIENT_SERVER_INTEGRATION_TESTS.md
+17-10Lines changed: 17 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -838,20 +838,25 @@ export function expectValidResponse<T>(response: any): asserts response is T {
838
838
839
839
### Local Development
840
840
841
+
**Note:** Integration tests require a running ObjectStack server. The server is provided by a separate repository/package and is not included in this spec repository.
842
+
841
843
```bash
842
-
# Start test server
843
-
cd packages/server
844
-
pnpm dev:test
844
+
# Start test server (in the ObjectStack server repository)
845
+
# Follow the server project's documentation for setup
846
+
# Example: cd /path/to/objectstack-server && pnpm dev:test
845
847
846
-
# Run integration tests
848
+
# Run integration tests (in this repository)
847
849
cd packages/client
848
850
pnpm test:integration
849
851
```
850
852
851
853
### CI/CD Pipeline
852
854
855
+
**Note:** The workflow file referenced below is an example. Actual CI implementation will require setting up the test server infrastructure separately.
Copy file name to clipboardExpand all lines: packages/client/tests/integration/README.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,17 @@ This directory contains integration tests that verify `@objectstack/client` agai
6
6
7
7
### Prerequisites
8
8
9
-
1.**Start a test server:**
9
+
**Note:** Integration tests require a running ObjectStack server with test data. The server is provided by a separate repository and must be set up independently.
10
+
11
+
1.**Start a test server (external dependency):**
10
12
```bash
11
-
cd ../../server
12
-
pnpm dev:test
13
+
# In the ObjectStack server repository (separate from this package)
14
+
# Follow that project's documentation for test server setup
15
+
# Example: cd /path/to/objectstack-server && pnpm dev:test
13
16
```
14
17
15
-
2.**Run integration tests:**
18
+
2.**Run integration tests (from this package):**
16
19
```bash
17
-
cd ../../client
18
20
pnpm test:integration
19
21
```
20
22
@@ -62,9 +64,9 @@ Tests are organized by protocol namespace:
62
64
63
65
## CI/CD
64
66
65
-
Integration tests run automatically in CI when:
66
-
-Pull requests are created
67
-
-Changes are pushed to main branch
68
-
-Manual workflow dispatch
67
+
Integration tests can be run in CI, but require:
68
+
-A running ObjectStack server instance (from separate repository)
69
+
-Test database with sample data
70
+
-Proper environment configuration
69
71
70
-
See `.github/workflows/client-integration-tests.yml` for the CI configuration.
72
+
See `CLIENT_SERVER_INTEGRATION_TESTS.md` for example CI configuration structure.
0 commit comments