![]() This notation lets you specify the target file or a specific part of a file you want to reference. The value of $ref uses the JSON Reference notation, and the portion starting with # uses the JSON Pointer notation. ![]() ![]() To refer that object, you need to add $ref with the corresponding path to your response: To reference a definition, use the $ref keyword:įor example, suppose you have the following schema object, which you want to use inside your response: ![]() It can be the same server, or another one – for example, GitHub, SwaggerHub, and so on. With OpenAPI 3.0, you can reference a definition hosted on any location. In that case, you can create a snippet for such elements in order to use them multiple times when you need it. When you document an API, it is common to have some features which you use across several of API resources.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |