Skip to content

Commit

Permalink
style(api-docs): clean up api documentation.
Browse files Browse the repository at this point in the history
Previously, it was not possible to check request/response bodies samples in API documentation. This commit solves this error by refactoring the API documentation by using yaml for all api schemas/samples and decomposition of the open-api.yaml file.

- decompose the mod-search.yaml file.
- move all the paths into separate yaml files with corresponded folders inside paths folder.
- move all the parameters into separate yaml files inside the parameters folder.
- create yaml versions for all the examples.
- create yaml versions for all the schemas.
- delete example files with sample extension.
- delete schemas files with json extension.

Closes MSEARCH-546.
  • Loading branch information
GeloPakDev1 committed Mar 26, 2024
1 parent 6e8160d commit da0d8e1
Show file tree
Hide file tree
Showing 186 changed files with 410 additions and 3,331 deletions.
20 changes: 20 additions & 0 deletions src/main/java/org/folio/search/model/ResourceId.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.folio.search.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ResourceId {

private String id;

public ResourceId id(String id) {
this.id = id;
return this;
}
}
27 changes: 27 additions & 0 deletions src/main/java/org/folio/search/model/ResourceIds.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.folio.search.model;

import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ResourceIds {

private Integer totalRecords;
private List<ResourceId> ids;

public ResourceIds totalRecords(Integer totalRecords) {
this.totalRecords = totalRecords;
return this;
}

public ResourceIds ids(List<ResourceId> ids) {
this.ids = ids;
return this;
}
}
14 changes: 0 additions & 14 deletions src/main/resources/swagger.api/examples/HoldingIdsResult.sample

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/resources/swagger.api/examples/IdsTextResult.sample

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/resources/swagger.api/examples/InstanceIdsResult.sample

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/resources/swagger.api/examples/facetResult.sample

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/resources/swagger.api/examples/indexCreationError.sample

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/resources/swagger.api/examples/indexNotFoundError.sample

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/resources/swagger.api/examples/reindexRequest.sample

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/resources/swagger.api/examples/resourceIdsResult.sample

This file was deleted.

20 changes: 0 additions & 20 deletions src/main/resources/swagger.api/examples/searchResult.sample

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/resources/swagger.api/examples/unknownError.sample

This file was deleted.

This file was deleted.

Loading

0 comments on commit da0d8e1

Please sign in to comment.