lib/open_api/config.rb in zero-rails_openapi-1.3.2 vs lib/open_api/config.rb in zero-rails_openapi-1.3.3

- old
+ new

@@ -16,24 +16,24 @@ # Everything about OAS3 is on https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.0.md # Getting started: https://swagger.io/docs/specification/basic-structure/ cattr_accessor :register_docs do { - # [REQUIRED] At least one doc. - zero_rails: { - # [REQUIRED] ZRO will scan all the descendants of the root_controller, and then generate their docs. - root_controller: ApplicationController, - - # [REQUIRED] Info Object: The info section contains API information - info: { - # [REQUIRED] The title of the application. - title: 'Zero Rails Apis', - # [REQUIRED] The version of the OpenAPI document - # (which is distinct from the OpenAPI Specification version or the API implementation version). - version: '0.0.1' - } - } + # # [REQUIRED] At least one doc. + # zero_rails_api: { + # # [REQUIRED] ZRO will scan all the descendants of the root_controller, and then generate their docs. + # root_controller: ApplicationController, + # + # # [REQUIRED] Info Object: The info section contains API information + # info: { + # # [REQUIRED] The title of the application. + # title: 'Zero Rails Apis', + # # [REQUIRED] The version of the OpenAPI document + # # (which is distinct from the OpenAPI Specification version or the API implementation version). + # version: '0.0.1' + # } + # } } end cattr_accessor :is_options do %w[ email phone password uuid uri url time date ] @@ -53,11 +53,11 @@ cattr_accessor :jbuilder_templates do { index: ( <<~FILE - # *** Generated by ZRO *** + # *** Generated by ZRO [ please make sure that you have checked this file ] *** json.partial! 'api/base', total: @data.size json.data do # @data = @data.page(@_page).per(@_rows) if @_page || @_rows # json.array! @data do |datum| @@ -68,11 +68,11 @@ FILE ), show: ( <<~FILE - # *** Generated by ZRO *** + # *** Generated by ZRO [ please make sure that you have checked this file ] *** json.partial! 'api/base', total: 1 json.data do json.array! [ @data ] do |datum| json.(datum, *datum.show_attrs) if datum.present? @@ -81,17 +81,17 @@ FILE ), success: ( <<~FILE - # *** Generated by ZRO *** + # *** Generated by ZRO [ please make sure that you have checked this file ] *** json.partial! 'api/success' FILE ), success_or_not: ( <<~FILE - # *** Generated by ZRO *** + # *** Generated by ZRO [ please make sure that you have checked this file ] *** unless @status # @_code, @_msg = @error_info.present? ? @error_info : ApiError.action_failed.info end json.partial! 'api/base', total: 0