frank_fjs
3 years agoOccasional Contributor
How do I refer domain responses, parameters and pathitems from a API?
Hi,
I am starting using domains in swaggerHub and I know yet how reference domains definitions (models) works, but I don't know how reference domain responses, parameters and pathitems and I don't find documentation for that cases. I am trying it using the domain example provided from SwaggerHub uncommenting the domain responses, parameters and pathitems examples
### Domains, a place to put your reusable components
### Examples...
info:
description: This is a sample Domain
version: '1.0.0'
title: Sample Domain
definitions:
ErrorModel:
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
responses:
GeneralError:
description: General Error
schema:
$ref: '#/definitions/ErrorModel'
parameters:
skipParam:
name: skip
in: query
description: number of items to skip
type: integer
pathitems:
EntityOperations:
get:
description: Returns a pet based on ID
summary: Find pet by ID
responses:
default:
$ref: '#/responses/GeneralError'
Can anyone give a code example for everyone? Maybe autocompletion don't work for this cases. Any help?
Thanks a lot