Skip to content

Commit 9421f90

Browse files
committed
10.01.05: Default Interpreter for VS Code, allocation fix, F5 note, #als
1 parent 4d31c66 commit 9421f90

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

api_logic_server_cli/prototypes/base/api/customize_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
app_logger = logging.getLogger(__name__)
1212

1313
def expose_services(app, api, project_dir, swagger_host: str, PORT: str):
14-
""" #als: Customize API - new end points for services
14+
""" Customize API - new end points for services
1515
1616
Brief background: see readme_customize_api.md
1717

api_logic_server_cli/prototypes/base/test/api_logic_server_behave/features/steps/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import test_utils
44
import json
55

6-
#als: implement behave tests
6+
# Implement Behave Tests -- your code goes here
77

88
@given('Sample Database')
99
def step_impl(context):

api_logic_server_cli/prototypes/nw/api/customize_api.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -366,15 +366,15 @@ def stop():
366366
return jsonify({ "success": True, "message": "Server is shutting down..." })
367367

368368

369+
"""
370+
Illustrates #als: custom end point with swagger, RowDictMapper
371+
372+
* Custom service - visible in swagger
373+
* Services *not* requiring authentication (contrast to CategoriesEndPoint, below)
374+
* Use OrderB2B (extends RowDictMapper) to map json to rows
375+
* Recall business logic is not in service, but encapsulated for reuse in logic/declare_logic.py
376+
"""
369377
class ServicesEndPoint(safrs.JABase):
370-
"""
371-
Illustrates #als: custom end point with swagger, RowDictMapper
372-
373-
* Custom service - visible in swagger
374-
* Services *not* requiring authentication (contrast to CategoriesEndPoint, below)
375-
* Use OrderB2B (extends RowDictMapper) to map json to rows
376-
* Recall business logic is not in service, but encapsulated for reuse in logic/declare_logic.py
377-
"""
378378

379379

380380
@classmethod
@@ -498,20 +498,20 @@ def add_order(self, *args, **kwargs): # yaml comment => swagger description
498498

499499

500500

501-
class CategoriesEndPoint(safrs.JABase):
502-
"""
503-
Illustrates #als: auth required
504-
* Swagger-visible RPC that requires authentication (@jwt_required()).
505-
* Row Security
501+
"""
502+
Illustrates #als: auth required
503+
* Swagger-visible RPC that requires authentication (@jwt_required()).
504+
* Row Security
506505
507-
Test in swagger (auth required)
508-
* Post to endpoint auth to obtain <access_token> value - copy to clipboard
509-
* Row Security - Users determines results
510-
* u1 - 1 row, u2 - 4 rows, admin - 9 rows
511-
* Authorize (top of swagger), using Bearer <access_token>
512-
* Post to CategoriesEndPoint/get_cats, observe results depend on login
506+
Test in swagger (auth required)
507+
* Post to endpoint auth to obtain <access_token> value - copy to clipboard
508+
* Row Security - Users determines results
509+
* u1 - 1 row, u2 - 4 rows, admin - 9 rows
510+
* Authorize (top of swagger), using Bearer <access_token>
511+
* Post to CategoriesEndPoint/get_cats, observe results depend on login
513512
514-
"""
513+
"""
514+
class CategoriesEndPoint(safrs.JABase):
515515

516516
@staticmethod
517517
@jwt_required()

api_logic_server_cli/prototypes/nw/test/api_logic_server_behave/features/steps/place_order.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
logic_logs_dir = "logs/scenario_logic_logs"
99

1010
"""
11-
#als: implement behave tests
11+
Implement behave tests - Your Code Goes Here
1212
1313
These tests can be re-run -- they restore the data to original state.
1414
15-
#als: Good illustrations of API calls from Python.
16-
1715
Rows used for testing:
1816
* customer: ALFKI, with a balance of 2102
1917
* order: 10643, with an amount 1086
@@ -86,6 +84,8 @@ def step_impl(context):
8684
8785
You can set breakpoints in events, and inspect these.
8886
87+
#als: Behave Test, Invoking API from Python
88+
8989
"""
9090
scenario_name = 'Good Order Custom Service'
9191
add_order_uri = f'http://localhost:5656/api/ServicesEndPoint/add_order'

docker/api_logic_server.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# GA release
2-
# docker buildx build --push -f docker/api_logic_server.Dockerfile --tag apilogicserver/api_logic_server:10.01.00 -o type=image --platform=linux/arm64,linux/amd64 .
2+
# docker buildx build --push -f docker/api_logic_server.Dockerfile --tag apilogicserver/api_logic_server:10.01.05 -o type=image --platform=linux/arm64,linux/amd64 .
33
# docker buildx build --push -f docker/api_logic_server.Dockerfile --tag apilogicserver/api_logic_server:latest -o type=image --platform=linux/arm64,linux/amd64 .
44

55
# Beta - test codespaces with tutorial, API_Fiddle (change .devcontainer.json -> apilogicserver/api_logic_server_x)

0 commit comments

Comments
 (0)