#NEWLINE# def test_inputArraySchema( self ) : #NEWLINE# #INDENT# "\n        The generated API documentation includes the input schema if it's an\n        array of objects.\n        " #NEWLINE# app = Klein ( ) #NEWLINE# @ app . route ( b'/' , methods = [ b'GET' ] ) #NEWLINE# @ structured ( inputSchema = { #NEWLINE# #INDENT# '$ref' : '/v0/test.json#/endpoint' , #NEWLINE# #UNINDENT# } , outputSchema = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , schema_store = self . INPUT_ARRAY_SCHEMAS ) #NEWLINE# @ user_documentation ( 'Undocumented.' , header = 'Header' , section = 'section' ) #NEWLINE# def dummy_f( ) : #NEWLINE# #INDENT# '\n            Developer docs,\n            ' #NEWLINE# #UNINDENT# rest = list ( makeRst ( b'/prefix' , 'section' , app , None , rest . INPUT_ARRAY_SCHEMAS ) ) #NEWLINE# self . assertListEqual ( rest , [ 'Header' , '------' , '' , '' , '.. http:get:: /prefix/' , '' , '   Undocumented.' , '   ' , '   .. hidden-code-block:: json' , '       :label: + Request JSON Schema' , '       :starthidden: True' , '   ' , '       {' , '           "$schema": "http://json-schema.org/draft-04/schema#",' , '           "items": {' , '               "properties": {' , '                   "param": {' , '                       "description": "one\\ntwo",' , '                       "title": "TITLE",' , '                       "type": "string"' , '                   }' , '               },' , '               "required": [' , '                   "param"' , '               ],' , '               "type": "object"' , '           },' , '           "type": "array"' , '       }' , '   ' , '   :<jsonarr string param: *(required)* TITLE' , '   ' , '      one' , '      two' , '      ' , '' ] )