Forum Discussion
Advance WAF on F5 Doesn't support Open API version 3. Mismatch when import Swagger to F5 for APi Sec
Dear team,
As i checking with some F5 Engineer in my country, they say that even latest OS version of F5 only support Open API Swagger version 2. And now, when my company build a new applicaction based on Backbase, they use Open API version 3.0.3 for those API spec. It leads to some problem when import API Spec to create APi Security. For example, i have this API Spec.
/client-api/repositories/{repositoryId}/upload:
description: Uploading content to specified repository. it is the replacement
of /upload/form endpoint.
post:
tags:
- ContentUpload
description: Performs uploading of content
operationId: handleContentUpload
parameters:
- name: repositoryId
in: path
description: ID of the repository to save and/or update uploaded content items.
required: true
style: simple
explode: false
schema:
type: string
example: null
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/DocumentUpload'
responses:
"200":
description: Document successfully created and/or updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Document'
example:
$ref: '#/components/examples/UploadResponseExample'
"400":
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/StatusMessage'
"403":
description: File threat detected
content:
application/json:
schema:
$ref: '#/components/schemas/StatusMessage'
"404":
description: Object not found
content:
application/json:
schema:
$ref: '#/components/schemas/StatusMessage'
DocumentUpload:
title: Document upload
required:
- file
- name
- targetPath
type: object
properties:
targetPath:
type: string
description: Path where the item should be added.
example: null
file:
type: string
description: File to upload.
format: binary
example: null
name:
type: string
description: File name.
example: null
cmis:objectTypeId:
type: string
description: Document Object Type ID property.
example: null
enum:
- cmis:document
cmis:createdBy:
type: string
description: Document created by property.
example: null
cmis:lastModifiedBy:
type: string
description: Document last modified by property.
example: null
bb:title:
type: string
description: Document title property.
example: null
bb:locale:
type: string
description: Document locale property.
example: null
changeToken:
type: string
description: Document change token property.
example: null
createSignedUrl:
title: Create Signed URL for content after its creation
type: boolean
description: "If storage type supports generation of signed url for given\
\ content, setting this to true will generate a signed url for a limited\
\ time."
example: null
default: false
example: null
When import to F5, F5 device can't understand and create param like targetPath, file, name, etc. And even when i try to add those properties to request body like below f5 still can't understand:
/client-api/repositories/{repositoryId}/upload:
description: Uploading content to specified repository. it is the replacement
of /upload/form endpoint.
post:
tags:
- ContentUpload
description: Performs uploading of content
operationId: handleContentUpload
parameters:
- name: repositoryId
in: path
description: ID of the repository to save and/or update uploaded content items.
required: true
style: simple
explode: false
schema:
type: string
example: null
requestBody:
content:
multipart/form-data:
schema:
title: Document upload
required:
- file
- name
- targetPath
type: object
properties:
targetPath:
type: string
description: Path where the item should be added.
example: null
file:
type: string
description: File to upload.
format: binary
example: null
name:
type: string
description: File name.
example: null
cmis:objectTypeId:
type: string
description: Document Object Type ID property.
example: null
enum:
- cmis:document
cmis:createdBy:
type: string
description: Document created by property.
example: null
cmis:lastModifiedBy:
type: string
description: Document last modified by property.
example: null
bb:title:
type: string
description: Document title property.
example: null
bb:locale:
type: string
description: Document locale property.
example: null
changeToken:
type: string
description: Document change token property.
example: null
createSignedUrl:
title: Create Signed URL for content after its creation
type: boolean
description: "If storage type supports generation of signed url for given\
\ content, setting this to true will generate a signed url for a limited\
\ time."
example: null
default: false
example: null
But when importing an API like this, F5 can understand and create corresponding param.
/client-api/v5/ext/message-center/messages:
summary: Manage messages for user support request
description: Manage messages for user support request
post:
tags:
- message-center-ext-client
summary: Create a root message of a conversation for user support request.
description: Create a root message of a conversation for user support request.
operationId: postCustomMessages
parameters:
- name: sendSupportRequestParameters
in: query
required: true
schema:
$ref: '#/components/schemas/SendSupportRequestParameters'
requestBody:
description: Upload list file
content:
multipart/form-data:
schema:
type: object
properties:
files:
type: array
description: The file to be uploaded contains one or more batches
according to any structured format known by the implementing service.
items:
type: string
description: The file to be uploaded contains one or more batches
according to any structured format known by the implementing service.
format: binary
nullable: true
default: ''
minItems: 0
maxItems: 5Properties files is created on F5 with this Spec, what is the different and How should i edit the first Spec so F5 can understand. Please help advice.
2 Replies
in this f5 doc (https://my.f5.com/manage/s/article/K81943444##4) the OAS input file is JSON format while your input file is in YAML
have you tried exporting the spec to json in swagger than upload to f5?
- Mango_LearnToUserF5
Nimbostratus
Hi Zamroti777,
Thank you, let me try it though most of the time when importing OAS with YAML format F5 still can understand.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
