Skip to content

Commit

Permalink
refactor(core): #23 Rename the openapi-extender to openapi-extender-s… (
Browse files Browse the repository at this point in the history
#25)

* refactor(core): #23 Rename the openapi-extender to openapi-extender-swagger-core

- openapi-extender module got renamed to openapi-extender-swagger-core
- Modules are having root package named after the maven module
- building samples step is now introduced in the CI

* refactor(core): #23 Rename the openapi-extender to openapi-extender-swagger-core

- Fixing CI build

* refactor(core): #23 Rename the openapi-extender to openapi-extender-swagger-core

- Don't build samples (yet)
  • Loading branch information
nandorholozsnyak authored Nov 21, 2022
1 parent 2daf3fc commit bdc3f19
Show file tree
Hide file tree
Showing 55 changed files with 130 additions and 117 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ jobs:
if: always() # always run even if the previous step fails
with:
report_paths: '**/target/surefire-reports/TEST-*.xml'
# - name: install-java17
# uses: actions/setup-java@v2
# with:
# java-version: 17
# distribution: temurin
# cache: maven
# - name: Build & Verify Samples
# run: ./mvnw clean verify -f samples/pom.xml

1 change: 1 addition & 0 deletions .idea/misc.xml

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

4 changes: 4 additions & 0 deletions openapi-extender-resource-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,22 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.rodnansol.generator;
package org.rodnansol.openapi.extender.generator;

import org.rodnansol.generator.io.FileWriter;
import org.rodnansol.openapi.extender.generator.io.FileWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.rodnansol.generator;
package org.rodnansol.openapi.extender.generator;

import static org.rodnansol.generator.MediaTypeUtil.MEDIA_TYPES;
import static org.rodnansol.openapi.extender.generator.MediaTypeUtil.MEDIA_TYPES;

/**
* Response example file writer class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.generator;
package org.rodnansol.openapi.extender.generator;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.generator;
package org.rodnansol.openapi.extender.generator;

/**
* Class to be used as the report parameter.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.rodnansol.generator;
package org.rodnansol.openapi.extender.generator;

import static org.rodnansol.generator.MediaTypeUtil.MEDIA_TYPES;
import static org.rodnansol.openapi.extender.generator.MediaTypeUtil.MEDIA_TYPES;

/**
* Request body example file writer class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.generator;
package org.rodnansol.openapi.extender.generator;

/**
* Interface decribing the input of the resource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.generator;
package org.rodnansol.openapi.extender.generator;

/**
* Exception to be thrown when the content type if unknown.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.generator.io;
package org.rodnansol.openapi.extender.generator.io;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.rodnansol.generator.io;
package org.rodnansol.openapi.extender.generator.io;

import org.rodnansol.generator.UnknownContentTypeException;
import org.rodnansol.openapi.extender.generator.UnknownContentTypeException;

import java.io.IOException;
import java.nio.file.Files;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.generator.io;
package org.rodnansol.openapi.extender.generator.io;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.generator.io;
package org.rodnansol.openapi.extender.generator.io;

import com.fasterxml.jackson.dataformat.xml.XmlMapper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import java.nio.charset.StandardCharsets;

import org.rodnalsol.openapi.extender.restassured.exception.OpenApiFilterException;
import org.rodnansol.generator.ReportParams;
import org.rodnansol.generator.RequestBodyExampleFileOutputResourceGenerator;
import org.rodnansol.openapi.extender.generator.ReportParams;
import org.rodnansol.openapi.extender.generator.RequestBodyExampleFileOutputResourceGenerator;

/**
* Rest assured filter class for generating OpenAPI request example.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import java.io.IOException;

import org.rodnalsol.openapi.extender.restassured.exception.OpenApiFilterException;
import org.rodnansol.generator.ApiResponseExampleFileOutputResourceGenerator;
import org.rodnansol.generator.ReportParams;
import org.rodnansol.openapi.extender.generator.ApiResponseExampleFileOutputResourceGenerator;
import org.rodnansol.openapi.extender.generator.ReportParams;

/**
* Rest assured filter class for generating OpenAPI response example.
Expand Down
2 changes: 2 additions & 0 deletions openapi-extender-spring-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.rodnansol.spring;
package org.rodnansol.openapi.extender.spring;

import org.rodnansol.generator.ApiResponseExampleFileOutputResourceGenerator;
import org.rodnansol.generator.ReportParams;
import org.rodnansol.openapi.extender.generator.ApiResponseExampleFileOutputResourceGenerator;
import org.rodnansol.openapi.extender.generator.ReportParams;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.mock.web.MockHttpServletResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.spring;
package org.rodnansol.openapi.extender.spring;

/**
* Static factory methods for the document reporter classes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.spring;
package org.rodnansol.openapi.extender.spring;

/**
* Exception to be thrown from the ResultHandlers.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.rodnansol.spring;
package org.rodnansol.openapi.extender.spring;

import org.rodnansol.generator.ReportParams;
import org.rodnansol.generator.RequestBodyExampleFileOutputResourceGenerator;
import org.rodnansol.openapi.extender.generator.ReportParams;
import org.rodnansol.openapi.extender.generator.RequestBodyExampleFileOutputResourceGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.mock.web.MockHttpServletRequest;
Expand Down
2 changes: 1 addition & 1 deletion openapi-extender-springdoc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependencies>
<dependency>
<groupId>org.rodnansol</groupId>
<artifactId>openapi-extender</artifactId>
<artifactId>openapi-extender-swagger-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.rodnansol.springdoc;
package org.rodnansol.openapi.extender.springdoc;

import io.swagger.v3.oas.models.Operation;
import org.rodnansol.core.operation.OperationExtenderAction;
import org.rodnansol.core.operation.RequestBodyExampleOperationExtenderAction;
import org.rodnansol.core.operation.ResponseExampleOperationExtenderAction;
import org.rodnansol.openapi.extender.swagger.core.operation.OperationExtenderAction;
import org.rodnansol.openapi.extender.swagger.core.operation.RequestBodyExampleOperationExtenderAction;
import org.rodnansol.openapi.extender.swagger.core.operation.ResponseExampleOperationExtenderAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springdoc.core.customizers.OperationCustomizer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.rodnansol.springdoc;
package org.rodnansol.openapi.extender.springdoc;

import org.rodnansol.core.example.ExampleReferencePopulationAction;
import org.rodnansol.core.example.ExampleReferenceType;
import org.rodnansol.core.resource.ExtenderResource;
import org.rodnansol.core.resource.FileNameBasedExampleResourceReader;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferencePopulationAction;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferenceType;
import org.rodnansol.openapi.extender.swagger.core.resource.ExtenderResource;
import org.rodnansol.openapi.extender.swagger.core.resource.FileNameBasedExampleResourceReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.Resource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.rodnansol.springdoc;
package org.rodnansol.openapi.extender.springdoc;

import io.swagger.v3.oas.models.OpenAPI;
import org.rodnansol.core.example.ExampleReferenceContext;
import org.rodnansol.core.openapi.OpenApiExamplePopulationAction;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferenceContext;
import org.rodnansol.openapi.extender.swagger.core.openapi.OpenApiExamplePopulationAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springdoc.core.customizers.OpenApiCustomiser;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.springdoc;
package org.rodnansol.openapi.extender.springdoc;

/**
* Exception to be thrown at when a resource could not be loaded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>openapi-extender</artifactId>
<name>OpenAPI Extender - Core</name>
<artifactId>openapi-extender-swagger-core</artifactId>
<name>OpenAPI Extender - Swagger Core</name>

<properties>
<maven.compiler.source>8</maven.compiler.source>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.core.example;
package org.rodnansol.openapi.extender.swagger.core.example;

/**
* Represents an example reference read from a resource.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.core.example;
package org.rodnansol.openapi.extender.swagger.core.example;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.core.example;
package org.rodnansol.openapi.extender.swagger.core.example;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.rodnansol.core.example;
package org.rodnansol.openapi.extender.swagger.core.example;

import org.rodnansol.core.resource.ExampleReferenceCreationResult;
import org.rodnansol.core.resource.ExampleResourceReader;
import org.rodnansol.core.resource.ExtenderResource;
import org.rodnansol.openapi.extender.swagger.core.resource.ExampleReferenceCreationResult;
import org.rodnansol.openapi.extender.swagger.core.resource.ExampleResourceReader;
import org.rodnansol.openapi.extender.swagger.core.resource.ExtenderResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.core.example;
package org.rodnansol.openapi.extender.swagger.core.example;

/**
* Type of the example.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.rodnansol.core.openapi;
package org.rodnansol.openapi.extender.swagger.core.openapi;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.examples.Example;
import org.rodnansol.core.example.ExampleReference;
import org.rodnansol.core.example.ExampleReferenceContext;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReference;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferenceContext;

import java.util.HashMap;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.core.operation;
package org.rodnansol.openapi.extender.swagger.core.operation;

/**
* Exception being thrown on errors in the extender actions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.core.operation;
package org.rodnansol.openapi.extender.swagger.core.operation;


import io.swagger.v3.oas.models.Operation;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.rodnansol.core.operation;
package org.rodnansol.openapi.extender.swagger.core.operation;

import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.examples.Example;
import io.swagger.v3.oas.models.media.Content;
import io.swagger.v3.oas.models.media.MediaType;
import io.swagger.v3.oas.models.parameters.RequestBody;
import org.rodnansol.core.example.ExampleReference;
import org.rodnansol.core.example.ExampleReferenceContext;
import org.rodnansol.core.example.ExampleReferenceKey;
import org.rodnansol.core.example.ExampleReferenceType;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReference;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferenceContext;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferenceKey;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferenceType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package org.rodnansol.core.operation;
package org.rodnansol.openapi.extender.swagger.core.operation;

import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.examples.Example;
import io.swagger.v3.oas.models.media.Content;
import io.swagger.v3.oas.models.media.MediaType;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.oas.models.responses.ApiResponses;
import org.rodnansol.core.example.ExampleReference;
import org.rodnansol.core.example.ExampleReferenceContext;
import org.rodnansol.core.example.ExampleReferenceKey;
import org.rodnansol.core.example.ExampleReferenceType;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReference;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferenceContext;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferenceKey;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferenceType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.rodnansol.core.resource;
package org.rodnansol.openapi.extender.swagger.core.resource;

import org.rodnansol.core.example.ExampleReference;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReference;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.rodnansol.core.resource;
package org.rodnansol.openapi.extender.swagger.core.resource;

import org.rodnansol.core.example.ExampleReferenceType;
import org.rodnansol.openapi.extender.swagger.core.example.ExampleReferenceType;

/**
* Interface describes what a resource reader implementation should have.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.core.resource;
package org.rodnansol.openapi.extender.swagger.core.resource;

/**
* Exception to be thrown when the resource can not be read.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.rodnansol.core.resource;
package org.rodnansol.openapi.extender.swagger.core.resource;

import java.io.InputStream;

Expand Down
Loading

0 comments on commit bdc3f19

Please sign in to comment.