json HSDS / A入门使用OpenAPI

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json HSDS / A入门使用OpenAPI相关的知识,希望对你有一定的参考价值。

swagger: '2.0'
info:
  title: "Open Referral API"
  description: "This is an OpenAPI for an HSDS/A organization"
host: api.open.referral.adopta.agency
basePath: /
schemes:
- http
produces:
- application/json
paths:
  /organizations/:
    get:
      summary: Get Organizations
      description: Get Organizations
      operationId: listOrganizations
      parameters:
        - in: query
          type: number
          name: query
          description: A query to filter result by.
        - in: query
          type: number
          name: page
          description: The particular page of results.
        - in: query
          type: number
          name: per_page
          description: Amount of locations to return per page, up to 100.
      responses:
        '200':
          description: Organization Response
          schema:
            type: array
            items:
              $ref: "#/definitions/organization"
      tags:
      - Organizations
definitions:
  organization:
    properties:
      id:
        description: 'Each organization must have a unique identifier.'
        type: string
      name:
        description: 'The official or public name of the organization.'
        type: string
      alternate_name:
        description: 'Alternative or commonly used name for the organization.'
        type: string
      description:
        description: 'A brief summary about the organization. It can contain markup such as HTML or Markdown.'
        type: string
      email:
        description: 'The contact e-mail address for the organization.'
        type: string
      url:
        description: 'The URL (website address) of the organization.'
        type: string
      tax_status:
        description: 'Government assigned tax designation for for tax-exempt organizations.'
        type: string
      tax_id:
        description: 'A government issued identifier used for the purpose of tax administration.'
        type: string
      year_incorporated:
        description: 'The year in which the organization was legally formed.'
        type: string
      legal_status:
        description: 'The legal status defines the conditions that an organization is operating under; e.g. non-profit, private corporation or a government organization.'
        type: string
    required:
      - id
      - name

以上是关于json HSDS / A入门使用OpenAPI的主要内容,如果未能解决你的问题,请参考以下文章

重命名 OpenAPI 的参考生成的 swagger.json

openapi转ts

如何从 protobuf (.proto) 文件中生成 (.json/.yaml) 中的 swagger3 (OpenAPI3) 规范?

json OpenAPI的-spec.json

Swagger Gradle 插件在构建期间没有为 spring mvc 正确生成 openapi.json 文件

如何从 OpenAPI 3.0 yaml 文件生成 JSON 示例?