# API Schema Generate/Sync Collection Issues with Root Path /

**URL:** <https://community.postman.com/t/api-schema-generate-sync-collection-issues-with-root-path/14688>\
**Category:** Help Hub\
**Created:** [August 3, 2020, 10:43pm UTC](https://community.postman.com/t/api-schema-generate-sync-collection-issues-with-root-path/14688 "2020-08-03T22:43:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![darren.capner](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/darren.capner/32/4730_2.png) [@darren.capner](https://community.postman.com/u/darren.capner)\
**Post date:** [August 3, 2020, 10:43pm UTC](https://community.postman.com/t/api-schema-generate-sync-collection-issues-with-root-path/14688/1 "2020-08-03T22:43:47Z")

</div>

When defining an API schema that uses root as it’s path, the collection generated causes collection schema validation error.

Schema:

```
openapi: "3.0.1"
info:
  title: "Shippers"
  version: "1.0.0"
servers:
- url: "{baseUrl}"
paths:
  /:
	post:
	  summary: Create Shipper
	  description: Create a Shipper user.
	  operationId: createShipper
	  requestBody:
		content:
		  application/json:
			schema:
			  $ref: "#/components/schemas/CreateShipperRequest"
			example:
			  email: "{{USER_NAME}}"
			  password: "{{PASSWORD}}"
	  responses:
		200:
		  description: "200 OK"
		  content:
			application/json:
			  schema:
				$ref: "#/components/schemas/ShipperAndCompanyResponse"
			  example:
				status: 200
				code: 2001
				message: "The shipper was created."
				data:
				  shipper:
					email: "testaccount@gmail.com"
		400:
		  description: "400 Bad Request - Shipper already exists"
		  content:
			application/json:
			  schema:
				$ref: "#/components/schemas/Response"
			  example:
				status: 400
				code: 4002
				message: "Shipper already exists."
components:
  schemas:
	CreateShipperRequest:
	  title: "Create Shipper Request Schema"
	  required:
		- "email"
		- "password"
	  type: "object"
	  properties:
		email:
		  type: string
		password:
		  type: string
	Response:
	  title: "Response Schema"
	  required:
		- "status"
		- "code"
		- "message"
	  type: "object"
	  properties:
		status:
		  type: integer
		code:
		  type: integer
		message:
		  type: string
	ShipperAndCompanyResponse:
	  title: "Shipper and Company Response Schema"
	  allOf:
	  - $ref: '#/components/schemas/Response'
	  - type: object
		required:
		- "data"
		properties:
		  data:
			required:
			  - "shipper"
			  - "company"
			type: object
			properties:
			  shipper:
				required:
				  - "email"
				type: object
				properties:
				  email:
					type: string
  securitySchemes:
	authorizer:
	  type: "apiKey"
	  name: "Authorization"
	  in: "header"
	  x-amazon-apigateway-authtype: "custom"

```

Postman API Schema Editor found no validation errors.

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/f/f47db14dcbc45e19eb07bb20c06b80b7dfadd2fc.png)

Validate collection against schema:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/2/9/29bde0533c5ce5928e180fcde7e6071d04c8e8b9.png)

Postman Validation Errors when validating collection against schema:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/2/2/22e2c20578c9430a68eedd1119a683baf92fd5d4.png)

When I accept the changes to add a new request and delete the generated request, the same validation errors are shown after re-validation.

If anyone has knows any reason why this is happening, that would be helpful. I have only encountered this when defining a root path ‘/’.

---

<div class="post-metadata">

**Author:** ![shivangi.bajpai](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@shivangi.bajpai](https://community.postman.com/u/shivangi.bajpai)\
**Post date:** [August 4, 2020, 8:33am UTC](https://community.postman.com/t/api-schema-generate-sync-collection-issues-with-root-path/14688/2 "2020-08-04T08:33:40Z")

</div>

Hey @darren.capner, thank you for reporting this. We have identified the issue and working on the fix. This will be fixed soon 🙂

---

<div class="post-metadata">

**Author:** ![arlem](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/arlem/32/3078_2.png) [@arlem](https://community.postman.com/u/arlem)\
**Post date:** [August 18, 2020, 10:59am UTC](https://community.postman.com/t/api-schema-generate-sync-collection-issues-with-root-path/14688/3 "2020-08-18T10:59:55Z")

</div>

Hey @darren.capner!

This should now be fixed. 🙂 Could you try again and let us know if that works?

---

<div class="post-metadata">

**Author:** ![darren.capner](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/darren.capner/32/4730_2.png) [@darren.capner](https://community.postman.com/u/darren.capner)\
**Post date:** [August 18, 2020, 1:33pm UTC](https://community.postman.com/t/api-schema-generate-sync-collection-issues-with-root-path/14688/4 "2020-08-18T13:33:59Z")

</div>

Thank you very much. I have run validation on a few of my APIs and they now validate successfully.
