Skip to content

Commit

Permalink
fix(#200): correcting documentation test requiring local host environ…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
novoj committed Dec 8, 2023
1 parent 16286ca commit 83198c6
Show file tree
Hide file tree
Showing 79 changed files with 557 additions and 258 deletions.
7 changes: 5 additions & 2 deletions .idea/misc.xml

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

52 changes: 26 additions & 26 deletions documentation/user/en/get-started/create-first-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ that forms a tree, product is enabled to have prices:
Now you can use the [system API](/documentation/user/en/use/connectors/graphql.md#graphql-api-instances) via the URL
`https://your-server:5555/gql/system` to create a new empty catalog:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly local>
<SourceCodeTabs langSpecificTabOnly local>

[Example of creating empty catalog](/documentation/user/en/get-started/example/define-catalog.graphql)
</SourceCodeTabs>
Expand All @@ -77,7 +77,7 @@ modifying its schema via the [catalog schema API](/documentation/user/en/use/con
contains some attributes (either localized or non-localized), category is marked as a hierarchical entity that forms
a tree, product is enabled to have prices:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly local>
<SourceCodeTabs langSpecificTabOnly local>

[Example of creating empty catalog](/documentation/user/en/get-started/example/define-schema-for-catalog.graphql)
</SourceCodeTabs>
Expand All @@ -91,7 +91,7 @@ a tree, product is enabled to have prices:
Now you can use the [system API](/documentation/user/en/use/connectors/rest.md#rest-api-instances) via the URL
`https://your-server:5555/rest/system/catalogs` to create a new empty catalog:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly local>
<SourceCodeTabs langSpecificTabOnly local>

[Example of creating empty catalog](/documentation/user/en/get-started/example/define-catalog.rest)
</SourceCodeTabs>
Expand All @@ -102,7 +102,7 @@ modifying its schema via the [catalog schema API](/documentation/user/en/use/con
contains some attributes (either localized or non-localized), category is marked as a hierarchical entity that forms
a tree, product is enabled to have prices:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly local>
<SourceCodeTabs langSpecificTabOnly local>

[Example of creating empty catalog](/documentation/user/en/get-started/example/define-schema-for-catalog.rest)
</SourceCodeTabs>
Expand All @@ -115,7 +115,7 @@ a tree, product is enabled to have prices:

Once the catalog is created and the schema is known, you can insert a first entity to the catalog:

<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/complete-startup.java,/documentation/user/en/get-started/example/define-test-catalog.java" langSpecificTabOnly local>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/complete-startup.java,/documentation/user/en/get-started/example/define-test-catalog.java" langSpecificTabOnly local>

[Example of inserting an entity](/documentation/user/en/get-started/example/create-first-entity.java)
</SourceCodeTabs>
Expand All @@ -128,7 +128,7 @@ the load in the cluster.

Let's see how you can retrieve the entity you just created in another read-only session.

<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/create-first-entity.java" langSpecificTabOnly local>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-first-entity.java" langSpecificTabOnly local>

[Example of reading an entity by primary key](/documentation/user/en/get-started/example/read-entity-by-pk.java)
</SourceCodeTabs>
Expand All @@ -142,7 +142,7 @@ Once the catalog is created and the schema is known, you can insert a first enti
[catalog data API](/documentation/user/en/use/connectors/graphql.md#graphql-api-instances) at the
`https://your-server:5555/gql/test-catalog` URL:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly local>
<SourceCodeTabs langSpecificTabOnly local>

[Example of inserting an entity](/documentation/user/en/get-started/example/create-first-entity.graphql)
</SourceCodeTabs>
Expand All @@ -156,7 +156,7 @@ the load in the cluster.
Let's see how you can retrieve the entity you just created in another read-only session via the same catalog data API
as mentioned above.

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly local>
<SourceCodeTabs langSpecificTabOnly local>

[Example of reading an entity by primary key](/documentation/user/en/get-started/example/read-entity-by-pk.graphql)
</SourceCodeTabs>
Expand All @@ -170,7 +170,7 @@ Once the catalog is created and the schema is known, you can insert a first enti
[catalog data API](/documentation/user/en/use/connectors/rest.md#rest-api-instances) at the URL
`https://your-server:5555/rest/test-catalog/brand`:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly local>
<SourceCodeTabs langSpecificTabOnly local>

[Example of inserting an entity](/documentation/user/en/get-started/example/create-first-entity.rest)
</SourceCodeTabs>
Expand All @@ -184,7 +184,7 @@ the load in the cluster.
Let's see how you can retrieve the entity you just created in another read-only session via the same catalog data API
as mentioned above.

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly>
<SourceCodeTabs langSpecificTabOnly>

[Example of reading an entity by primary key](/documentation/user/en/get-started/example/read-entity-by-pk.rest)
</SourceCodeTabs>
Expand All @@ -197,7 +197,7 @@ as mentioned above.

Once you learn the basics, you can create a small dataset to work with:

<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/complete-startup.java,/documentation/user/en/get-started/example/define-test-catalog.java" langSpecificTabOnly>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/complete-startup.java,/documentation/user/en/get-started/example/define-test-catalog.java" langSpecificTabOnly>

[Example of creating a small dataset](/documentation/user/en/get-started/example/create-small-dataset.java)
</SourceCodeTabs>
Expand All @@ -213,21 +213,21 @@ have in the relational database. The example shows how to define attributes, ass

To get a better idea of the data, let's list the existing entities from the database.

<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>

[Example of listing entities](/documentation/user/en/get-started/example/list-entities.java)
</SourceCodeTabs>

You can also filter and sort the data:

<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>

[Example of filtering and ordering entities](/documentation/user/en/get-started/example/filter-order-entities.java)
</SourceCodeTabs>

Or you can filter all products by price in EUR greater than €300 and order by price with the cheapest products first:

<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>

[Example of filtering and ordering products by price](/documentation/user/en/get-started/example/filter-order-products-by-price.java)
</SourceCodeTabs>
Expand All @@ -240,7 +240,7 @@ Or you can filter all products by price in EUR greater than €300 and order by

Updating an entity is similar to creating a new entity:

<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>

[Example of listing entities](/documentation/user/en/get-started/example/update-entity.java)
</SourceCodeTabs>
Expand All @@ -260,7 +260,7 @@ For more information, see the [write API description](../use/api/write-data.md#u

Updating an entity is similar to creating a new entity:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly>
<SourceCodeTabs langSpecificTabOnly>

[Example of listing entities](/documentation/user/en/get-started/example/update-entity.graphql)
</SourceCodeTabs>
Expand All @@ -277,7 +277,7 @@ For more information, see the [write API description](../use/api/write-data.md#u

Updating an entity is similar to creating a new entity:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly>
<SourceCodeTabs langSpecificTabOnly>

[Example of listing entities](/documentation/user/en/get-started/example/update-entity.rest)
</SourceCodeTabs>
Expand All @@ -296,13 +296,13 @@ For more information, see the [write API description](../use/api/write-data.md#u
You can delete entity by is primary key:

<LanguageSpecific to="java">
<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/complete-startup.java,/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly local>

[Example of deleting entity by PK](/documentation/user/en/get-started/example/delete-entity-by-pk.java)
</SourceCodeTabs>
</LanguageSpecific>
<LanguageSpecific to="csharp">
<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/complete-startup.java,/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly local>

[Example of deleting entity by PK](/documentation/user/en/get-started/example/delete-entity-by-pk.cs)
</SourceCodeTabs>
Expand All @@ -311,13 +311,13 @@ You can delete entity by is primary key:
Or, you can issue a query that removes all the entities that match the query:

<LanguageSpecific to="java">
<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly local>

[Example of deleting entity by query](/documentation/user/en/get-started/example/delete-entity-by-query.java)
</SourceCodeTabs>
</LanguageSpecific>
<LanguageSpecific to="csharp">
<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly>
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-small-dataset.java" langSpecificTabOnly local>

[Example of deleting entity by query](/documentation/user/en/get-started/example/delete-entity-by-query.cs)
</SourceCodeTabs>
Expand All @@ -326,13 +326,13 @@ Or, you can issue a query that removes all the entities that match the query:
When you delete a hierarchical entity, you can choose whether or not to delete it with all of its child entities:

<LanguageSpecific to="java">
<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/complete-startup.java,/documentation/user/en/get-started/example/create-small-dataset.java">
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-small-dataset.java">

[Example of deleting hierarchical entity](/documentation/user/en/get-started/example/delete-hierarchical-entity.java)
</SourceCodeTabs>
</LanguageSpecific>
<LanguageSpecific to="csharp">
<SourceCodeTabs requires="ignoreTest,/documentation/user/en/get-started/example/complete-startup.java,/documentation/user/en/get-started/example/create-small-dataset.java">
<SourceCodeTabs requires="/documentation/user/en/get-started/example/create-small-dataset.java">

[Example of deleting hierarchical entity](/documentation/user/en/get-started/example/delete-hierarchical-entity.cs)
</SourceCodeTabs>
Expand All @@ -349,7 +349,7 @@ For more complex examples and explanations, see the [write API chapter](../use/a
You can issue a query that removes all the entities that match the query using the same catalog data API that you
would use to insert, update or retrieve entities:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly>
<SourceCodeTabs langSpecificTabOnly local>

[Example of deleting entity by query](/documentation/user/en/get-started/example/delete-entity-by-query.graphql)
</SourceCodeTabs>
Expand All @@ -363,15 +363,15 @@ For more complex examples and explanations, see the [write API chapter](../use/a

You can delete entity by is primary key:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly>
<SourceCodeTabs langSpecificTabOnly local>

[Example of deleting entity by PK](/documentation/user/en/get-started/example/delete-entity-by-pk.rest)
</SourceCodeTabs>

Or, you can issue a query that removes all the entities that match the query using the same catalog data API that you
would use to insert, update or retrieve entities:

<SourceCodeTabs requires="ignoreTest" langSpecificTabOnly>
<SourceCodeTabs langSpecificTabOnly local>

[Example of deleting entity by query](/documentation/user/en/get-started/example/delete-entity-by-query.rest)
</SourceCodeTabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
evita,
ApiOptions.builder()
.enable(GrpcProvider.CODE)
.enable(GraphQLProvider.CODE)
.enable(RestProvider.CODE)
.enable(SystemProvider.CODE)
.build()
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evita.UpdateCatalog(
"testCatalog",
"evita",
session => {
session
.CreateNewEntity("Brand", 1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evita.updateCatalog(
"testCatalog",
"evita",
session -> {
session
.createNewEntity("Brand", 1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evita.UpdateCatalog(
"testCatalog",
"evita",
session => {
session
.CreateNewEntity("Brand", 2)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evita.updateCatalog(
"testCatalog",
"evita",
session -> {
session
.createNewEntity("Brand", 2)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
evita.DefineCatalog("testCatalog")
evita.DefineCatalog("evita")
.WithEntitySchema(
"Brand",
entitySchema => entitySchema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
evita.defineCatalog("testCatalog")
evita.defineCatalog("evita")
.withEntitySchema(
"Brand",
entitySchema -> entitySchema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mutation {
createCatalog(name: "testCatalog") {
createCatalog(name: "evita") {
name
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POST /rest/system/catalogs

{
"name": "testCatalog"
"name": "evita"
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
evita.defineCatalog("testCatalog");
evita.defineCatalog("evita");
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evita.UpdateCatalog(
"testCatalog", session => {
"evita", session => {
return session.DeleteEntity(
"Brand",
1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evita.updateCatalog(
"testCatalog", session -> {
"evita", session -> {
return session.deleteEntity(
"Brand",
1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evita.UpdateCatalog(
"testCatalog", session => {
"evita", session => {
return session.DeleteEntities(
Query(
Collection("Brand"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evita.updateCatalog(
"testCatalog", session -> {
"evita", session -> {
return session.deleteEntities(
query(
collection("Brand"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evita.UpdateCatalog(
"testCatalog", session => {
"evita", session => {
return session.DeleteEntityAndItsHierarchy(
"Category",
1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evita.updateCatalog(
"testCatalog", session -> {
"evita", session -> {
return session.deleteEntityAndItsHierarchy(
"Category",
1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
return evita.QueryCatalog(
"testCatalog",
"evita",
session => {
return session.QueryListOfSealedEntities(
Query(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
return evita.queryCatalog(
"testCatalog",
"evita",
session -> {
return session.queryListOfSealedEntities(
query(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
return evita.QueryCatalog(
"testCatalog",
"evita",
session => {
return session.QueryListOfSealedEntities(
Query(
Expand Down
Loading

0 comments on commit 83198c6

Please sign in to comment.