SNIA / Swordfish-API-Emulator

The Swordfish API Emulator can emulate a Swordfish-based system statically or dynamically. Starting from an initial state described by mock-ups, the emulator can be used to emulate a Swordfish system responding to create/modify/delete operations in order to allow developers to model new Swordfish functionality, test clients, demonstrate Swordfish and other similar functions.
Other
22 stars 20 forks source link

POST to Members needs to be redirected to Collection #114

Closed rahlvers closed 1 year ago

rahlvers commented 1 year ago

Currently a post to /Members creates an object with an Id of members.

Fix is to add code in post (self, xxxId) that resets the xxxId to a generated Id (the same behavior when Id isn't submitted) when the Id is detected as "Members".

rahlvers commented 1 year ago

Example:

    # Check if SessionId == "Members", and reset SessionId for remainder of the post request:
    if (SessionId == 'Members') or (SessionId == 'members'):
        SessionId = ''.join(random.choices(string.ascii_uppercase + string.digits, k=5))