2022年7月9日 星期六

[Course]OpenAPIs

# Swagger Hub

=> The platform for AI Design and Documentation with openAPI

https://swagger.io/tools/swaggerhub/


Open API - Specification

https://github.com/OAI/OpenAPI-Specification


Example 3.0

https://github.com/OAI/OpenAPI-Specification/tree/main/examples/v3.0


Implementations 

https://github.com/OAI/OpenAPI-Specification/blob/main/IMPLEMENTATIONS.md

# prefer visual studio


Widdershins

Redoc (personal) ***

===


Schemas

https://github.com/OAI/OpenAPI-Specification/tree/main/schemas


===

Open API 3.1.0 Spec

https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md


============

Info object

https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#info-object


======

Path object 

https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#pathsObject


=====

JSON Schema

#OpenAPI is effectively extending out JSON schema

# regexi s a very powerful tool that you can utilize as far as doing string validations

=====

Schema Composition

https://json-schema.org/understanding-json-schema/reference/combining.html

# allOf

# anyOf

# oneOf

=============


OpenAPI data types

https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#data-types


=====

OpenAPI Components

https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#componentsObject


=====

Reference Object

Allow referencing other component in the specification

https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#referenceObject

"$ref": " #/components/schemas/Pet"

# = within this document

# it is going to look for a map propery called Pets and that pets is expected to be either a schema Object or a reference object 


Reference the same object internally 

# great way to make sure that your OpenAPI schema is gonna be consistent because you do have this component objects that allows you to reuse those.


#  Relative Schema Document Example

> fully qualified URL

    >> {"$ref": "http://example.com/example.json/foo/bar" }


#  Relative Documents with Embedded Schema Example




沒有留言:

張貼留言

IT Knowledge Map

https://docs.google.com/spreadsheets/d/1ZmN7G1unUAEpTPp5ObDnlAUtILLwwvluy-KHumMPEUU/edit#gid=0