diff --git a/hledger-web/config/openapi.yaml b/hledger-web/config/openapi.yaml new file mode 100644 index 000000000..dad2d08b9 --- /dev/null +++ b/hledger-web/config/openapi.yaml @@ -0,0 +1,561 @@ +openapi: 3.1.0 +info: + title: OpenAPI Specification + description: "Basic description of [hledger-web's JSON-over-HTTP API](https://hledger.org/hledger-web.html#json-api).\ + \ A specification generated by [openapi-devtools](https://github.com/AndrewWalsh/openapi-devtools).\ + \ Contains 7 endpoints." + version: 1.0.0 +servers: +- url: / +paths: + /version: + get: + summary: /version + description: "**Host**: http://127.0.0.1:5000" + responses: + "200": + description: "" + content: + application/json: + schema: {} + security: + - apikey_cookie__session: [] + - apikey_header_cookie: [] + /accountnames: + get: + summary: /accountnames + description: "**Host**: http://127.0.0.1:5000" + responses: + "200": + description: "" + content: + application/json: + schema: + items: {} + security: + - apikey_cookie__session: [] + - apikey_header_cookie: [] + /transactions: + get: + summary: /transactions + description: "**Host**: http://127.0.0.1:5000" + responses: + "200": + description: "" + content: + application/json: + schema: + items: + required: + - tcode + - tcomment + - tdate + - tdate2 + - tdescription + - tindex + - tpostings + - tprecedingcomment + - tsourcepos + - tstatus + - ttags + properties: + tcode: {} + tcomment: {} + tdate: {} + tdate2: {} + tdescription: {} + tindex: {} + tpostings: + items: + required: + - paccount + - pamount + - pbalanceassertion + - pcomment + - pdate + - pdate2 + - poriginal + - pstatus + - ptags + - ptransaction_ + - ptype + properties: + paccount: {} + pamount: + items: + required: + - acommodity + - acost + - aquantity + - astyle + properties: + acommodity: {} + acost: + anyOf: + - {} + - required: + - contents + - tag + properties: + contents: + required: + - acommodity + - acost + - aquantity + - astyle + properties: + acommodity: {} + acost: {} + aquantity: + required: + - decimalMantissa + - decimalPlaces + - floatingPoint + properties: + decimalMantissa: {} + decimalPlaces: {} + floatingPoint: {} + astyle: + required: + - ascommodityside + - ascommodityspaced + - asdecimalmark + - asdigitgroups + - asprecision + - asrounding + properties: + ascommodityside: {} + ascommodityspaced: {} + asdecimalmark: {} + asdigitgroups: {} + asprecision: {} + asrounding: {} + tag: {} + aquantity: + required: + - decimalMantissa + - decimalPlaces + - floatingPoint + properties: + decimalMantissa: {} + decimalPlaces: {} + floatingPoint: {} + astyle: + required: + - ascommodityside + - ascommodityspaced + - asdecimalmark + - asdigitgroups + - asprecision + - asrounding + properties: + ascommodityside: {} + ascommodityspaced: {} + asdecimalmark: {} + asdigitgroups: {} + asprecision: {} + asrounding: {} + pbalanceassertion: {} + pcomment: {} + pdate: {} + pdate2: {} + poriginal: {} + pstatus: {} + ptags: {} + ptransaction_: {} + ptype: {} + tprecedingcomment: {} + tsourcepos: + items: + required: + - sourceColumn + - sourceLine + - sourceName + properties: + sourceColumn: {} + sourceLine: {} + sourceName: {} + tstatus: {} + ttags: {} + security: + - apikey_cookie__session: [] + - apikey_header_cookie: [] + /prices: + get: + summary: /prices + description: "**Host**: http://127.0.0.1:5000" + responses: + "200": + description: "" + content: + application/json: + schema: + items: + required: + - mpdate + - mpfrom + - mprate + - mpto + properties: + mpdate: {} + mpfrom: {} + mprate: + required: + - decimalMantissa + - decimalPlaces + - floatingPoint + properties: + decimalMantissa: {} + decimalPlaces: {} + floatingPoint: {} + mpto: {} + security: + - apikey_cookie__session: [] + - apikey_header_cookie: [] + /commodities: + get: + summary: /commodities + description: "**Host**: http://127.0.0.1:5000" + responses: + "200": + description: "" + content: + application/json: + schema: + items: {} + security: + - apikey_cookie__session: [] + - apikey_header_cookie: [] + /accounts: + get: + summary: /accounts + description: "**Host**: http://127.0.0.1:5000" + responses: + "200": + description: "" + content: + application/json: + schema: + items: + required: + - aboring + - adeclarationinfo + - aebalance + - aibalance + - aname + - anumpostings + - aparent_ + - asubs + - asubs_ + properties: + aname: {} + adeclarationinfo: {} + aebalance: + items: + required: + - acommodity + - acost + - aquantity + - astyle + properties: + acommodity: {} + acost: + anyOf: + - {} + - required: + - contents + - tag + properties: + contents: + required: + - acommodity + - acost + - aquantity + - astyle + properties: + acommodity: {} + acost: {} + aquantity: + required: + - decimalMantissa + - decimalPlaces + - floatingPoint + properties: + decimalMantissa: {} + decimalPlaces: {} + floatingPoint: {} + astyle: + required: + - ascommodityside + - ascommodityspaced + - asdecimalmark + - asdigitgroups + - asprecision + - asrounding + properties: + ascommodityside: {} + ascommodityspaced: {} + asdecimalmark: {} + asdigitgroups: {} + asprecision: {} + asrounding: {} + tag: {} + aquantity: + required: + - decimalMantissa + - decimalPlaces + - floatingPoint + properties: + decimalMantissa: {} + decimalPlaces: {} + floatingPoint: {} + astyle: + required: + - ascommodityside + - ascommodityspaced + - asdecimalmark + - asdigitgroups + - asprecision + - asrounding + properties: + ascommodityside: {} + ascommodityspaced: {} + asdecimalmark: {} + asdigitgroups: {} + asprecision: {} + asrounding: {} + aibalance: + items: + required: + - acommodity + - acost + - aquantity + - astyle + properties: + acommodity: {} + acost: + anyOf: + - {} + - required: + - contents + - tag + properties: + contents: + required: + - acommodity + - acost + - aquantity + - astyle + properties: + acommodity: {} + acost: {} + aquantity: + required: + - decimalMantissa + - decimalPlaces + - floatingPoint + properties: + decimalMantissa: {} + decimalPlaces: {} + floatingPoint: {} + astyle: + required: + - ascommodityside + - ascommodityspaced + - asdecimalmark + - asdigitgroups + - asprecision + - asrounding + properties: + ascommodityside: {} + ascommodityspaced: {} + asdecimalmark: {} + asdigitgroups: {} + asprecision: {} + asrounding: {} + tag: {} + aquantity: + required: + - decimalMantissa + - decimalPlaces + - floatingPoint + properties: + decimalMantissa: {} + decimalPlaces: {} + floatingPoint: {} + astyle: + required: + - ascommodityside + - ascommodityspaced + - asdecimalmark + - asdigitgroups + - asprecision + - asrounding + properties: + ascommodityside: {} + ascommodityspaced: {} + asdecimalmark: {} + asdigitgroups: {} + asprecision: {} + asrounding: {} + anumpostings: {} + aboring: {} + aparent_: {} + asubs_: + items: {} + asubs: {} + security: + - apikey_cookie__session: [] + - apikey_header_cookie: [] + /accounttransactions/1: + get: + summary: /accounttransactions/1 + description: "**Host**: http://127.0.0.1:5000" + responses: + "200": + description: "" + content: + application/json: + schema: + items: + items: + anyOf: + - {} + - items: + required: + - acommodity + - acost + - aquantity + - astyle + properties: + acommodity: {} + acost: {} + aquantity: + required: + - decimalMantissa + - decimalPlaces + - floatingPoint + properties: + decimalMantissa: {} + decimalPlaces: {} + floatingPoint: {} + astyle: + required: + - ascommodityside + - ascommodityspaced + - asdecimalmark + - asdigitgroups + - asprecision + - asrounding + properties: + ascommodityside: {} + ascommodityspaced: {} + asdecimalmark: {} + asdigitgroups: {} + asprecision: {} + asrounding: {} + - required: + - tcode + - tcomment + - tdate + - tdate2 + - tdescription + - tindex + - tpostings + - tprecedingcomment + - tsourcepos + - tstatus + - ttags + properties: + tcode: {} + tcomment: {} + tdate: {} + tdate2: {} + tdescription: {} + tindex: {} + tpostings: + items: + required: + - paccount + - pamount + - pbalanceassertion + - pcomment + - pdate + - pdate2 + - poriginal + - pstatus + - ptags + - ptransaction_ + - ptype + properties: + paccount: {} + pamount: + items: + required: + - acommodity + - acost + - aquantity + - astyle + properties: + acommodity: {} + acost: {} + aquantity: + required: + - decimalMantissa + - decimalPlaces + - floatingPoint + properties: + decimalMantissa: {} + decimalPlaces: {} + floatingPoint: {} + astyle: + required: + - ascommodityside + - ascommodityspaced + - asdecimalmark + - asdigitgroups + - asprecision + - asrounding + properties: + ascommodityside: {} + ascommodityspaced: {} + asdecimalmark: {} + asdigitgroups: {} + asprecision: {} + asrounding: {} + pbalanceassertion: {} + pcomment: {} + pdate: {} + pdate2: {} + poriginal: {} + pstatus: {} + ptags: {} + ptransaction_: {} + ptype: {} + tprecedingcomment: {} + tsourcepos: + items: + required: + - sourceColumn + - sourceLine + - sourceName + properties: + sourceColumn: {} + sourceLine: {} + sourceName: {} + tstatus: {} + ttags: {} + security: + - apikey_cookie__session: [] + - apikey_header_cookie: [] +components: + schemas: {} + securitySchemes: + apikey_cookie__session: + type: apiKey + name: _session + in: cookie + apikey_header_cookie: + type: apiKey + name: COOKIE + in: header