Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
with:
node-version: 18
cache: 'npm'
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run tests
run: npm test
# test_win:
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@api-components/api-method-documentation",
"description": "A HTTP method documentation build from AMF model",
"version": "5.2.28",
"version": "5.2.29",
"license": "Apache-2.0",
"main": "index.js",
"module": "index.js",
Expand Down
8 changes: 4 additions & 4 deletions src/ApiMethodDocumentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
this.operationId = this._getValue(method, this.ns.aml.vocabularies.apiContract.operationId);
this.callbacks = this._computeCallbacks(method);
this.deprecated = this._computeIsDeprecated(method);
this.agentParameters = this._computeAgentParameters(method);
this.agentParameters = this._computeAgentParametersByMethod(method);
}

_computeAsyncApiSecurity(){
Expand Down Expand Up @@ -1387,7 +1387,7 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
return undefined;
}

_computeAgentParameters(method) {
_computeAgentParametersByMethod(method) {
if (!method) {
return undefined;
}
Expand Down Expand Up @@ -1421,10 +1421,10 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
if (!isUserInput) {
return undefined;
}
const isInputEnabled = this._getValue(isUserInput[0], this.ns.aml.vocabularies.data.value);
const isInputValue = this._getValue(isUserInput[0], this.ns.aml.vocabularies.data.value);

const params = {
isInputEnabled,
isUserInput: isInputValue,
};

return params;
Expand Down
4 changes: 2 additions & 2 deletions test/agent-params.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ describe('agent-api', function() {
amf = await AmfLoader.load(apiFile, compact);
});

it('isInputEnabled is true', async () => {
it('isUserInput is true', async () => {
const endpopint = AmfLoader.lookupEndpoint(amf, '/reservations/reservationlookup');
const method = AmfLoader.lookupOperation(amf, '/reservations/reservationlookup', 'get');
element = await modelFixture(amf, endpopint, method);
await aTimeout();
assert.equal(element.agentParameters.isInputEnabled, 'true');
assert.equal(element.agentParameters.isUserInput, 'true');
});

it('renders the summary', async () => {
Expand Down