diff --git a/api/user/v1/user.proto b/api/user/v1/user.proto index 7683dbc..63b4677 100644 --- a/api/user/v1/user.proto +++ b/api/user/v1/user.proto @@ -8,6 +8,68 @@ import "gogo/protobuf/gogo.proto"; option go_package = "github.com/go-eagle/eagle-layout/api/user/v1;v1"; +// 定义参考:https://github.com/google/gnostic/blob/main/openapiv3/OpenAPIv3.proto +// demo参考:https://github.com/google/gnostic/blob/main/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/message.proto +// spec: https://swagger.io/docs/specification/basic-structure/ +option (openapi.v3.document) = { + info: { + title: "ins-api"; + version: "v1.0.0"; + description: "Description from annotation"; + contact: { + name: "Contact Name"; + url: "https://github.com/go-eagle/eagle-layout"; + email: ""; + } + license: { + name: "MIT License"; + url: "https://github.com/go-eagle/eagle-layout/blob/main/LICENSE"; + } + } + servers: [ + { + url: "http://localhost:8081"; + description: "本地环境"; + }, + { + url: "http://localhost:8081"; + description: "测试环境"; + }, + { + url: "http://ins-api.cool.io"; + description: "线上环境"; + } + ] + components: { + security_schemes: { + additional_properties: [ + { + name: "bearerAuth"; + value: { + security_scheme: { + type: "http"; + scheme: "bearer"; + bearer_format: "JWT"; + } + } + } + ] + } + } + security: [ + { + additional_properties: [ + { + name: "bearerAuth"; + value: { + value: [] + } + } + ] + } + ] +}; + // 用户服务 service UserService { // auth diff --git a/docs/favicon-16x16.png b/docs/favicon-16x16.png new file mode 100644 index 0000000..8b194e6 Binary files /dev/null and b/docs/favicon-16x16.png differ diff --git a/docs/favicon-32x32.png b/docs/favicon-32x32.png new file mode 100644 index 0000000..249737f Binary files /dev/null and b/docs/favicon-32x32.png differ diff --git a/docs/index.css b/docs/index.css new file mode 100644 index 0000000..f2376fd --- /dev/null +++ b/docs/index.css @@ -0,0 +1,16 @@ +html { + box-sizing: border-box; + overflow: -moz-scrollbars-vertical; + overflow-y: scroll; +} + +*, +*:before, +*:after { + box-sizing: inherit; +} + +body { + margin: 0; + background: #fafafa; +} diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..84ae62d --- /dev/null +++ b/docs/index.html @@ -0,0 +1,19 @@ + + + +
+ +>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,a=[],i=16383,s=0,l=n-o;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,a,i=[],s=t;ss&&(r=s-l),a=r;a>=0;a--){let r=!0;for(let n=0;n>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function O(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o