api documentation for swgg (2019.9.14)

this zero-dependency package will run a virtual swagger-ui server with persistent-storage in the browser, that your webapp can use (in-place of a real backend), with a working web-demo

table of contents

  1. module swgg
    1. function swgg.apiAjax (that, opt, onError)
    2. function swgg.apiUpdate (swaggerJson)
    3. function swgg.assertOrThrow (passed, message)
    4. function swgg.crudOptionsSetDefault (opt, defaults)
    5. function swgg.dbFieldRandomCreate (opt)
    6. function swgg.dbRowListRandomCreate (opt)
    7. function swgg.dbRowRandomCreate (opt)
    8. function swgg.fsRmrfSync (dir)
    9. function swgg.fsWriteFileWithMkdirpSync (file, data)
    10. function swgg.functionOrNop (fnc)
    11. function swgg.idDomElementCreate (seed)
    12. function swgg.idNameInit (opt)
    13. function swgg.middlewareBodyParse (req, res, next)
    14. function swgg.middlewareCrudBuiltin (req, res, next)
    15. function swgg.middlewareCrudCustom (req, response, nextMiddleware)
    16. function swgg.middlewareCrudEnd (req, res, next)
    17. function swgg.middlewareInitCustom (req, response, nextMiddleware)
    18. function swgg.middlewareRouter (req, res, next)
    19. function swgg.middlewareUserLogin (req, res, next)
    20. function swgg.middlewareValidate (req, res, next)
    21. function swgg.nop ()
    22. function swgg.normalizeSwaggerJson (swaggerJson, opt)
    23. function swgg.normalizeSwaggerParamDict (opt)
    24. function swgg.objectAssignDefault (target, source)
    25. function swgg.onErrorJsonapi (onError)
    26. function swgg.operationIdFromAjax (opt)
    27. function swgg.schemaPItems (schemaP)
    28. function swgg.schemaPItemsType (schemaP)
    29. function swgg.schemaPType (schemaP)
    30. function swgg.serverRespondJsonapi (req, res, err, data, meta)
    31. function swgg.swaggerJsonFromAjax (swaggerJson, opt)
    32. function swgg.swaggerJsonFromCurl (swaggerJson, text)
    33. function swgg.swaggerJsonFromPostBody (swaggerJson, opt)
    34. function swgg.swaggerValidate (swaggerJson)
    35. function swgg.swaggerValidateDataParameters (opt)
    36. function swgg.swaggerValidateDataSchema (opt)
    37. function swgg.swaggerValidateFile (opt, onError)
    38. function swgg.throwSwaggerError (opt)
    39. function swgg.uiEventDelegate (evt)
    40. function swgg.uiRenderSchemaP (schemaP)
    41. function swgg.urlParseWithBraket (url)
    42. function swgg.userLoginByPassword (opt, onError)
    43. function swgg.userLogout (opt, onError)
    44. function swgg.value (val)
    45. function swgg.valueOrEmptyList (val)
    46. function swgg.valueOrEmptyObject (val)
    47. function swgg.valueOrEmptyString (val)
    48. number swgg.timeExit
    49. object swgg.jslintResult
    50. object swgg.local
    51. object swgg.swaggerErrorTypeDict
    52. object swgg.swaggerJson
    53. object swgg.swaggerSchemaJson
    54. object swgg.templateApiDict
    55. object swgg.tmp
    56. object swgg.uiEventListenerDict
    57. object swgg.util
  2. module swgg.apiDict
    1. function swgg.apiDict.operationId._2Fx-test_2Ftags0Filter_20GET.ajax (swaggerJson, onError)
    2. function swgg.apiDict.operationId.addPet.ajax (swaggerJson, onError)
    3. function swgg.apiDict.operationId.createUser.ajax (swaggerJson, onError)
    4. function swgg.apiDict.operationId.createUsersWithArrayInput.ajax (swaggerJson, onError)
    5. function swgg.apiDict.operationId.createUsersWithListInput.ajax (swaggerJson, onError)
    6. function swgg.apiDict.operationId.deleteOrder.ajax (swaggerJson, onError)
    7. function swgg.apiDict.operationId.deletePet.ajax (swaggerJson, onError)
    8. function swgg.apiDict.operationId.deleteUser.ajax (swaggerJson, onError)
    9. function swgg.apiDict.operationId.file.crudCountManyByQuery.ajax (swaggerJson, onError)
    10. function swgg.apiDict.operationId.file.crudGetManyByQuery.ajax (swaggerJson, onError)
    11. function swgg.apiDict.operationId.file.crudRemoveOneById.id.id.ajax (swaggerJson, onError)
    12. function swgg.apiDict.operationId.file.crudSetOneById.id.id.ajax (swaggerJson, onError)
    13. function swgg.apiDict.operationId.file.crudUpdateOneById.id.id.ajax (swaggerJson, onError)
    14. function swgg.apiDict.operationId.file.fileGetOneById.id.id.ajax (swaggerJson, onError)
    15. function swgg.apiDict.operationId.file.fileUploadManyByForm.1.ajax (swaggerJson, onError)
    16. function swgg.apiDict.operationId.file.fileUploadManyByForm.2.ajax (swaggerJson, onError)
    17. function swgg.apiDict.operationId.findPetsByStatus.ajax (swaggerJson, onError)
    18. function swgg.apiDict.operationId.findPetsByTags.ajax (swaggerJson, onError)
    19. function swgg.apiDict.operationId.getInventory.ajax (swaggerJson, onError)
    20. function swgg.apiDict.operationId.getOrderById.ajax (swaggerJson, onError)
    21. function swgg.apiDict.operationId.getPetById.ajax (swaggerJson, onError)
    22. function swgg.apiDict.operationId.getUserByName.ajax (swaggerJson, onError)
    23. function swgg.apiDict.operationId.loginUser.ajax (swaggerJson, onError)
    24. function swgg.apiDict.operationId.logoutUser.ajax (swaggerJson, onError)
    25. function swgg.apiDict.operationId.pet.crudGetManyByQuery.ajax (swaggerJson, onError)
    26. function swgg.apiDict.operationId.placeOrder.ajax (swaggerJson, onError)
    27. function swgg.apiDict.operationId.store.crudGetManyByQuery.ajax (swaggerJson, onError)
    28. function swgg.apiDict.operationId.store.crudUpdateOneById.id.id.ajax (swaggerJson, onError)
    29. function swgg.apiDict.operationId.updatePet.ajax (swaggerJson, onError)
    30. function swgg.apiDict.operationId.updatePetWithForm.ajax (swaggerJson, onError)
    31. function swgg.apiDict.operationId.updateUser.ajax (swaggerJson, onError)
    32. function swgg.apiDict.operationId.uploadFile.ajax (swaggerJson, onError)
    33. function swgg.apiDict.operationId.user.crudCountManyByQuery.ajax (swaggerJson, onError)
    34. function swgg.apiDict.operationId.user.crudGetManyByQuery.ajax (swaggerJson, onError)
    35. function swgg.apiDict.operationId.user.crudRemoveOneById.username.username.ajax (swaggerJson, onError)
    36. function swgg.apiDict.operationId.user.crudSetOneById.username.username.ajax (swaggerJson, onError)
    37. function swgg.apiDict.operationId.user.crudUpdateOneById.username.username.ajax (swaggerJson, onError)
    38. function swgg.apiDict.operationId.user.userLoginByPassword.ajax (swaggerJson, onError)
    39. function swgg.apiDict.operationId.user.userLogout.ajax (swaggerJson, onError)
    40. function swgg.apiDict.operationId.x-test-markdown.description.ajax (swaggerJson, onError)
    41. function swgg.apiDict.operationId.x-test.crudCountManyByQuery.ajax (swaggerJson, onError)
    42. function swgg.apiDict.operationId.x-test.crudErrorDelete.ajax (swaggerJson, onError)
    43. function swgg.apiDict.operationId.x-test.crudErrorGet.ajax (swaggerJson, onError)
    44. function swgg.apiDict.operationId.x-test.crudErrorHead.ajax (swaggerJson, onError)
    45. function swgg.apiDict.operationId.x-test.crudErrorLogin.ajax (swaggerJson, onError)
    46. function swgg.apiDict.operationId.x-test.crudErrorOptions.ajax (swaggerJson, onError)
    47. function swgg.apiDict.operationId.x-test.crudErrorPatch.ajax (swaggerJson, onError)
    48. function swgg.apiDict.operationId.x-test.crudErrorPost.ajax (swaggerJson, onError)
    49. function swgg.apiDict.operationId.x-test.crudErrorPre.ajax (swaggerJson, onError)
    50. function swgg.apiDict.operationId.x-test.crudErrorPut.ajax (swaggerJson, onError)
    51. function swgg.apiDict.operationId.x-test.crudGetManyByQuery.ajax (swaggerJson, onError)
    52. function swgg.apiDict.operationId.x-test.crudGetOneById.id.id.ajax (swaggerJson, onError)
    53. function swgg.apiDict.operationId.x-test.crudGetOneByQuery.ajax (swaggerJson, onError)
    54. function swgg.apiDict.operationId.x-test.crudNullDelete.ajax (swaggerJson, onError)
    55. function swgg.apiDict.operationId.x-test.crudNullGet.ajax (swaggerJson, onError)
    56. function swgg.apiDict.operationId.x-test.crudNullHead.ajax (swaggerJson, onError)
    57. function swgg.apiDict.operationId.x-test.crudNullOptions.ajax (swaggerJson, onError)
    58. function swgg.apiDict.operationId.x-test.crudNullPatch.ajax (swaggerJson, onError)
    59. function swgg.apiDict.operationId.x-test.crudNullPost.ajax (swaggerJson, onError)
    60. function swgg.apiDict.operationId.x-test.crudNullPut.ajax (swaggerJson, onError)
    61. function swgg.apiDict.operationId.x-test.crudRemoveManyByQuery.ajax (swaggerJson, onError)
    62. function swgg.apiDict.operationId.x-test.crudRemoveOneById.id.id.ajax (swaggerJson, onError)
    63. function swgg.apiDict.operationId.x-test.crudSetManyById.ajax (swaggerJson, onError)
    64. function swgg.apiDict.operationId.x-test.crudSetOneById.id.id.ajax (swaggerJson, onError)
    65. function swgg.apiDict.operationId.x-test.crudUpdateOneById.id.id.ajax (swaggerJson, onError)
    66. function swgg.apiDict.operationId.x-test.errorUndefinedApi.ajax (swaggerJson, onError)
    67. function swgg.apiDict.operationId.x-test.fixErrorSemanticUniquePathAa.ajax (swaggerJson, onError)
    68. function swgg.apiDict.operationId.x-test.fixErrorSemanticUniquePathBb.ajax (swaggerJson, onError)
    69. function swgg.apiDict.operationId.x-test.onErrorJsonapi.ajax (swaggerJson, onError)
    70. function swgg.apiDict.operationId.x-test.parametersDefault.ajax (swaggerJson, onError)
    71. function swgg.apiDict.operationId.x-test.parametersDefaultInFormDataXml.ajax (swaggerJson, onError)
    72. function swgg.apiDict.operationId.x-test.parametersObjectInBody.ajax (swaggerJson, onError)
    73. function swgg.apiDict.operationId.x-test.parametersStringInBody.ajax (swaggerJson, onError)
    74. function swgg.apiDict.operationId.x-test.parametersStringInBodyRequired.ajax (swaggerJson, onError)
  3. module swgg.uiEventListenerDict
    1. function swgg.uiEventListenerDict.onEventInputTextareaChange (evt)
    2. function swgg.uiEventListenerDict.onEventInputValidateAndAjax ( opt, onError )
    3. function swgg.uiEventListenerDict.onEventOperationAjax (opt)
    4. function swgg.uiEventListenerDict.onEventOperationDisplayShow ( evt, onError )
    5. function swgg.uiEventListenerDict.onEventResourceDisplayAction (evt)
    6. function swgg.uiEventListenerDict.onEventUiReload (opt, onError)

module swgg

function swgg.apiAjax (that, opt, onError)

function swgg.apiUpdate (swaggerJson)

function swgg.assertOrThrow (passed, message)

function swgg.crudOptionsSetDefault (opt, defaults)

function swgg.dbFieldRandomCreate (opt)

function swgg.dbRowListRandomCreate (opt)

function swgg.dbRowRandomCreate (opt)

function swgg.fsRmrfSync (dir)

function swgg.fsWriteFileWithMkdirpSync (file, data)

function swgg.functionOrNop (fnc)

function swgg.idDomElementCreate (seed)

function swgg.idNameInit (opt)

function swgg.middlewareBodyParse (req, res, next)

function swgg.middlewareCrudBuiltin (req, res, next)

function swgg.middlewareCrudCustom (req, response, nextMiddleware)

function swgg.middlewareCrudEnd (req, res, next)

function swgg.middlewareInitCustom (req, response, nextMiddleware)

function swgg.middlewareRouter (req, res, next)

function swgg.middlewareUserLogin (req, res, next)

function swgg.middlewareValidate (req, res, next)

function swgg.nop ()

function swgg.normalizeSwaggerJson (swaggerJson, opt)

function swgg.normalizeSwaggerParamDict (opt)

function swgg.objectAssignDefault (target, source)

function swgg.onErrorJsonapi (onError)

function swgg.operationIdFromAjax (opt)

function swgg.schemaPItems (schemaP)

function swgg.schemaPItemsType (schemaP)

function swgg.schemaPType (schemaP)

function swgg.serverRespondJsonapi (req, res, err, data, meta)

function swgg.swaggerJsonFromAjax (swaggerJson, opt)

function swgg.swaggerJsonFromCurl (swaggerJson, text)

function swgg.swaggerJsonFromPostBody (swaggerJson, opt)

function swgg.swaggerValidate (swaggerJson)

function swgg.swaggerValidateDataParameters (opt)

function swgg.swaggerValidateDataSchema (opt)

function swgg.swaggerValidateFile (opt, onError)

function swgg.throwSwaggerError (opt)

function swgg.uiEventDelegate (evt)

function swgg.uiRenderSchemaP (schemaP)

function swgg.urlParseWithBraket (url)

function swgg.userLoginByPassword (opt, onError)

function swgg.userLogout (opt, onError)

function swgg.value (val)

function swgg.valueOrEmptyList (val)

function swgg.valueOrEmptyObject (val)

function swgg.valueOrEmptyString (val)

module swgg.apiDict

function swgg.apiDict.operationId._2Fx-test_2Ftags0Filter_20GET.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.addPet.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.createUser.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.createUsersWithArrayInput.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.createUsersWithListInput.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.deleteOrder.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.deletePet.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.deleteUser.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.file.crudCountManyByQuery.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.file.crudGetManyByQuery.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.file.crudRemoveOneById.id.id.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.file.crudSetOneById.id.id.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.file.crudUpdateOneById.id.id.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.file.fileGetOneById.id.id.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.file.fileUploadManyByForm.1.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.file.fileUploadManyByForm.2.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.findPetsByStatus.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.findPetsByTags.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.getInventory.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.getOrderById.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.getPetById.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.getUserByName.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.loginUser.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.logoutUser.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.pet.crudGetManyByQuery.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.placeOrder.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.store.crudGetManyByQuery.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.store.crudUpdateOneById.id.id.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.updatePet.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.updatePetWithForm.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.updateUser.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.uploadFile.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.user.crudCountManyByQuery.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.user.crudGetManyByQuery.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.user.crudRemoveOneById.username.username.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.user.crudSetOneById.username.username.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.user.crudUpdateOneById.username.username.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.user.userLoginByPassword.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.user.userLogout.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test-markdown.description.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudCountManyByQuery.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudErrorDelete.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudErrorGet.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudErrorHead.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudErrorLogin.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudErrorOptions.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudErrorPatch.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudErrorPost.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudErrorPre.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudErrorPut.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudGetManyByQuery.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudGetOneById.id.id.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudGetOneByQuery.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudNullDelete.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudNullGet.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudNullHead.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudNullOptions.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudNullPatch.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudNullPost.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudNullPut.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudRemoveManyByQuery.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudRemoveOneById.id.id.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudSetManyById.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudSetOneById.id.id.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.crudUpdateOneById.id.id.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.errorUndefinedApi.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.fixErrorSemanticUniquePathAa.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.fixErrorSemanticUniquePathBb.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.onErrorJsonapi.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.parametersDefault.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.parametersDefaultInFormDataXml.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.parametersObjectInBody.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.parametersStringInBody.ajax (swaggerJson, onError)

function swgg.apiDict.operationId.x-test.parametersStringInBodyRequired.ajax (swaggerJson, onError)

module swgg.uiEventListenerDict

function swgg.uiEventListenerDict.onEventInputTextareaChange (evt)

function swgg.uiEventListenerDict.onEventInputValidateAndAjax ( opt, onError )

function swgg.uiEventListenerDict.onEventOperationAjax (opt)

function swgg.uiEventListenerDict.onEventOperationDisplayShow ( evt, onError )

function swgg.uiEventListenerDict.onEventResourceDisplayAction (evt)

function swgg.uiEventListenerDict.onEventUiReload (opt, onError)

[ this document was created with utility2 ]