Code Monkey home page Code Monkey logo

specification's People

Contributors

alexwanglei avatar andrewshan avatar chuntaojun avatar daheige avatar fabian4 avatar houseme avatar lepdou avatar melodyl-xyz avatar movebean avatar pemako avatar polaris-admin avatar ranchowang avatar shedfreez avatar skyebefreeman avatar skywli avatar stringke avatar zilongtong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

specification's Issues

服务契约

目的

  1. 查看服务提供的接口和参数信息
  2. 发起mock请求

相关规范

  1. openapi https://spec.openapis.org/oas/v3.1.0
  2. opensergo https://github.com/opensergo/opensergo-proto/blob/main/opensergo/proto/service_contract/v1/service_contract.proto

openapi

对应 http 协议。

规范定义从整体来看分为两部分 Paths 和 Components

  • Paths 定义 url 接口方法
  • Components 定义参数结构

opensergo

看起来主要对应 grpc 协议

规范定义从整体来看分为两部分 Paths 和 Components

  • ServiceDescriptor 定义接口方法
  • TypeDescriptor 定义参数结构

服务契约

现有服务契约的定义与RPC协议深度绑定,原因也很简单,得有协议相关的完整信息才方便进行处理。

如果只做服务信息的展示,可以抽象出几个通用的概念:

ServiceContract
  - InterfaceDescriptor // 一个服务里有多个接口
    - MethodDescriptor // 一个接口里有多个方法,其中包含输入输出参数类型
  - TypeDescriptor // 参数的类型定义

github.com/polarismesh/[email protected]: verifying module: checksum mismatch

polarismesh/specification 安装失败

go clean -modcache && go mod tidy

提示:
github.com/polarismesh/specification/source/go/api/v1/model: github.com/polarismesh/[email protected]: verifying module: checksum mismatch
downloaded: h1:Rh+Ayz1L2b43CQx+KaBBGgaqMHJ+grrovPRSqA967ZI=
sum.golang.org: h1:fm7sUtFZC2g9+lLmRCtjGrUow47CY5JDFoZXwwCQGGY=

SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.