Sha256: 62d7abbe9ff3795b48d34b8961243262f3e7a492b2da5da59a8498f05f9a1087
Contents?: true
Size: 607 Bytes
Versions: 4
Compression:
Stored size: 607 Bytes
Contents
\* infrastructure service /id/{type}(get) procedure infrastructure_id_get( id_type ) { infrastructure_id_get_start: \* any ids left? if ( Cardinality( v_ids[ id_type ] ) = 0 ) { \* response: 404 & Nil InfrastructureServiceReturn( "/id/{type}(get)", "status_404", Nil ); } else { \* remove generated id from set of free ids v_ids := [ v_ids EXCEPT ![id_type] = @ \ { Next_id( id_type ) } ] ; \* response: 200 && generated id InfrastructureServiceReturn( "/id/{type}(get)", "status_200", [ id |-> Next_id( id_type ) ] ); }; return; }
Version data entries
4 entries across 4 versions & 1 rubygems