api2.yaml 873 B

1234567891011121314151617181920212223242526272829303132
  1. openapi: 3.0.0
  2. info:
  3. description: |
  4. This is a test to show how model refererence from another file are failing.
  5. This file is referenced api1.yaml. If you load api1.yaml first in the browser it fails.
  6. However, if you load this file first, then load api1.yaml it will work.
  7. version: 1.0.0
  8. title: API2 Test
  9. paths:
  10. '/test-api-2':
  11. get:
  12. summary: Api 2
  13. responses:
  14. '200':
  15. description: api 2 response
  16. content:
  17. application/json:
  18. schema:
  19. $ref: '#/components/schemas/TestResponse2'
  20. components:
  21. schemas:
  22. Api2Prop:
  23. type: string
  24. description: this is an api2prop
  25. example: 'api1prop-value'
  26. TestResponse2:
  27. type: object
  28. description: This is a test prop
  29. properties:
  30. api2prop:
  31. $ref: '#/components/schemas/Api2Prop'