I have an OpenAPI schema which groups requests by tags. I used to be able to generate a collection from the API definition which then places each request in a folder named according to the tag it belongs to.
In the most version of Postman this is no longer working. the generated collection ignores the tags and puts the requests at the root level without folder or creates a folder with the name corresponding to the path name e.g. when the request is in the path /spacecrafts then it creates a folder called spacecrafts, even if the request has a tag called vehicles
You can replicate this issue by creating an a new OpenAPI 3.0 YAML definition as follows:
openapi: '3.0.0'
info:
version: '1.0.0'
title: 'Sample API'
description: Buy or rent spacecrafts
tags:
- name: vehicles
description: Vehicles.
paths:
/spacecrafts/{spacecraftId}:
parameters:
- name: spacecraftId
description: The unique identifier of the spacecraft
in: path
required: true
schema:
$ref: '#/components/schemas/SpacecraftId'
get:
summary: Read a spacecraft
tags:
- vehicles
responses:
'200':
description: The spacecraft corresponding to the provided `spacecraftId`
content:
application/json:
schema:
$ref: '#/components/schemas/Spacecraft'
404:
description: No spacecraft found for the provided `spacecraftId`
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
500:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/spacecrafts:
get:
summary: Read spacecrafts
tags:
- vehicles
responses:
'200':
description: All spacecrafts
content:
application/json:
schema:
$ref: '#/components/schemas/Spacecrafts'
500:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
SpacecraftId:
description: The unique identifier of a spacecraft
type: string
Spacecraft:
type: object
required:
- id
- name
- type
properties:
id:
$ref: '#/components/schemas/SpacecraftId'
name:
type: string
type:
type: string
enum:
- capsule
- probe
- satellite
- spaceplane
- station
description:
type: string
Spacecrafts:
type: array
items:
$ref: '#/components/schemas/Spacecraft'
Error:
type: object
required:
- message
properties:
message:
description: A human readable error message
type: string
securitySchemes:
ApiKey:
type: apiKey
in: header
name: X-Api-Key
security:
- ApiKey: []
then you can try to create a collection from definition