Skip to content

Main #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: adding demo API with a "not" schema
Signed-off-by: Pawel Psztyc <jarrodek@gmail.com>
  • Loading branch information
jarrodek committed Sep 21, 2022
commit dd72e4b8fbe1c071f163909968d6c0ea2e32033a
38 changes: 38 additions & 0 deletions demo/apis/not-schema/not-schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
openapi: '3.0.2'
info:
title: Not schema
version: '1.0'
description: Test API for testing AMF service
contact:
name: API Support
url: http://www.example.com/support
email: support@example.com
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html

components:
schemas:
PetByType:
type: object
properties:
pet_type:
not:
type: integer
required:
- pet_type

paths:
/pets:
patch:
description: Tests the behavior of the "not" schema
summary: Not schema
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PetByType'
responses:
'200':
description: Updated

1 change: 1 addition & 0 deletions demo/model.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ config.set('simple-api/simple-api.raml', { type: 'RAML 1.0' });
config.set('example-generator-api/example-generator-api.raml', { type: "RAML 1.0" });
config.set('tracked-examples/tracked-to-linked.raml', { type: 'RAML 1.0' });
config.set('types-list/types-list.raml', { type: 'RAML 1.0' });
config.set('not-schema/not-schema.yaml', { type: 'OAS 3.0' });

const srcFolder = path.join('demo', 'apis');
const descFolder = path.join('demo', 'models');
Expand Down
2 changes: 1 addition & 1 deletion src/elements/ApiSchemaDocumentElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ export default class ApiSchemaDocumentElement extends ApiDocumentationBase {
${detailsTemplate(range)}
</div>
</div>
</div>
</div>
${expanded ? html`
<div class="shape-children">
<div class="property-border"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ ns.aml.vocabularies.apiContract.Callback = `${contractKey}Callback`;
ns.aml.vocabularies.apiContract.TemplatedLink = `${contractKey}TemplatedLink`;
ns.aml.vocabularies.apiContract.IriTemplateMapping = `${contractKey}IriTemplateMapping`;
ns.aml.vocabularies.apiContract.Tag = `${contractKey}Tag`;
ns.aml.vocabularies.apiContract.Message = `${contractKey}Message`;
ns.aml.vocabularies.apiContract.header = `${contractKey}header`;
ns.aml.vocabularies.apiContract.parameter = `${contractKey}parameter`;
ns.aml.vocabularies.apiContract.paramName = `${contractKey}paramName`;
Expand Down Expand Up @@ -158,7 +159,6 @@ ns.aml.vocabularies.apiContract.mapping = `${contractKey}mapping`;
ns.aml.vocabularies.apiContract.operationId = `${contractKey}operationId`;
ns.aml.vocabularies.apiContract.protocol = `${contractKey}protocol`;
ns.aml.vocabularies.apiContract.protocolVersion = `${contractKey}protocolVersion`;
ns.aml.vocabularies.apiContract.Message = `${contractKey}Message`;
ns.aml.vocabularies.apiContract.headerSchema = `${contractKey}headerSchema`;
ns.aml.vocabularies.apiContract.contentType = `${contractKey}contentType`;
ns.aml.vocabularies.apiContract.allowEmptyValue = `${contractKey}allowEmptyValue`;
Expand Down